What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-19 09:38:10
trim string python
string =' abc ' # After removing leading whitespace print(string.lstrip()); # Output: 'abc ' # After removing trailing whitespace print(string.rstrip()); # Output: ' abc' # After removing all whitespace print(string.strip()); # Output: 'abc' Add solution -
Python 2021-10-10 19:01:08
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('"',"") #Remov... Add solution -
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5