Question #329870

Input:1good23morning456


Output: goodmorning 123456



Explanation:given a string, write a program to remove all the numbers in it to its end.

Expert's answer

line = input()
letters = ''
digits = ''
for ch in line:
    if '0' <= ch <= '9':
        digits += ch
    else:
        letters += ch

print(letters, digits)
LATEST TUTORIALS
APPROVED BY CLIENTS