Answers for "remove single and double quotes from string python"

1

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
Posted by: Guest on May-06-2021

Code answers related to "remove single and double quotes from string python"

Python Answers by Framework

Browse Popular Code Answers by Language