Answer to Question #329870 in Python for Mamatha

Question #329870

Input:1good23morning456


Output: goodmorning 123456



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

1
Expert's answer
2022-04-17T15:30:38-0400
line = input()
letters = ''
digits = ''
for ch in line:
    if '0' <= ch <= '9':
        digits += ch
    else:
        letters += ch

print(letters, digits)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS