Posted on 10th September 2024|46 views
How can I remove all the special characters, punctuations and spaces from a string in python?
Posted on 10th September 2024| views
Try this example
>>> string = "Hey $#! People howareyou 007"
>>> ''.join(e for e in string if e.isalnum())
'Heypeoplehowareyou007'