I have strings like this - Chashme Baddoor Full Songs ★ JUKEBOX ★ Ali Zafar, Divyendu Sharma, Siddharth. I want to remove all non-alphanumeric characters from it. How can I do it in python?
Best way is to use regular expression. Check this example.
import res ='Chashme Baddoor Full Songs ★ JUKEBOX ★ Ali Zafar, Divyendu Sharma, Siddharth's = re.sub('[^0-9a-zA-Z ]+', '', s)
import re
s ='Chashme Baddoor Full Songs ★ JUKEBOX ★ Ali Zafar, Divyendu Sharma, Siddharth'
s = re.sub('[^0-9a-zA-Z ]+', '', s)