In Python, I want to extract only the characters from a string.
Consider I have the following string,
input = \"{(\'players\',): 24, (\'year\',): 28
Or if you want all characters regardless of words or empty spaces
a = "Some57 996S/tr::--!!ing" q = "" for i in a: if i.isalpha(): q = "".join([q,i])
print q 'SomeString'