Answers for "how to ignore double quotes in 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
5

python put quotes in string

# any character with a "" before it is ignored as syntax and placed in the string

print(""This should work for you" I said")
Posted by: Guest on June-04-2020

Code answers related to "how to ignore double quotes in python"

Python Answers by Framework

Browse Popular Code Answers by Language