Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

remove single and double quotes from string python

a_string = '"ab"cd"'
stripped_string = a_string.strip('"') # Only removes quote marks at each end
									  # of the string.
print(stripped_string)  #Output: ab"cd

replaced_string = a_string.replace('"',"") #Removes al quote marks from 
										   # string.
print(replaced_string) #Output: abcd
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #remove #single #double #quotes #string #python
ADD COMMENT
Topic
Name
5+8 =