Write a program to remove all the characters except numbers and alphabets
Topic: Write a program to remove all the characters except numbers and alphabets
Solution
import re ini_string = "123abcjw:, .@! eiw" print ("initial string : ", ini_string) result = re.sub('[\W_]+', '', ini_string) print ("final string", result)
List all Python Programs