+ 3

Removing non alphabetic characters

How to remove non alphabetic characters from a string in python

11th Jan 2021, 11:11 AM
Deepanshi 😍
Deepanshi 😍 - avatar
3 RĂ©ponses
+ 6
print("".join(_ for _ in input() if _.isalpha())) or new_string = "".join(_ for _ in old_string if _.isalpha())
11th Jan 2021, 11:48 AM
David Ashton
David Ashton - avatar
11th Jan 2021, 11:18 AM
Zohaib 👑
Zohaib 👑 - avatar
+ 2
Thanks😋😍😍
11th Jan 2021, 11:19 AM
Deepanshi 😍
Deepanshi 😍 - avatar