Code that extract string only | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Code that extract string only

print (''.join(x for x in input() if x.isalpha()))

16th Oct 2017, 10:24 PM
Enoch Nana Edusah
Enoch Nana Edusah - avatar
1 Answer
+ 1
Nice! Thanks for sharing! I really need to spend more time getting familiar with Python.
11th Nov 2017, 10:53 PM
David Carroll
David Carroll - avatar