Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Python :: pandas groupby count as new column 
Python :: How do you sum consecutive numbers in Python? 
Python :: how to align text in tkinter 
Python :: python sort list of strings numerically 
Python :: train_test_split without shuffle 
Python :: mean of a column pandas 
Python :: sklearn mean square error 
Python :: how to maker loops coun t in second in pytho 
Python :: how to count max repeated count in list python 
Python :: print specific part in bold or colours and end. 
Python :: change background color of tkinter 
Python :: python read toml file 
Python :: python send sms 
Python :: select python version ubuntu 
Python :: formula for compounding interest in python 
Python :: how to join a string by new line out of a list python 
Python :: python fdr correction 
Python :: pyspark session 
Python :: how to make text bold in tkinter 
Python :: remove rows if not matching with value in df 
Python :: remove column from dataframe 
Python :: append dataframe to another dataframe 
Python :: python get cpu info 
Python :: selenium close browser 
Python :: python read dictionary from file 
Python :: django serializer exclude fields 
Python :: sklearn version 
Python :: pandas create column from another column 
Python :: matplotlib plot data 
Python :: pie chart python pandas 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =