+ 1

Python remove character

I have tried remove and del but I can't figure out how to remove a character Pls help https://code.sololearn.com/c6a629z82X1o/?ref=app

20th Oct 2020, 11:14 PM
Cam UOR
Cam UOR - avatar
2 Answers
+ 2
There is no method or attribute like remove for string , Here I found ways to to remove character from a string but original string still won't be affected https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.askpython.com/python/string/remove-character-from-string-python&ved=2ahUKEwj5xvjCpsTsAhULyDgGHfkwBjsQFjAMegQIDxAB&usg=AOvVaw1MyEnwEKtWO283pvwazpGc&cshid=1603235779210 You can simply use replace method in case you don't wanna go through link string=string.replace(a,"")
20th Oct 2020, 11:17 PM
Abhay
Abhay - avatar
+ 2
Thank you
20th Oct 2020, 11:25 PM
Cam UOR
Cam UOR - avatar