Answer to Question #242463 in Python for Rishi

Question #242463
Give a string, write a program to move all the numbers in it to its end
1
Expert's answer
2021-09-26T12:27:54-0400
import sys


str1 = ""
str2 = ""
for c in input("Enter the strings: "):
    if c>='0' and c<='9':
        str2 += c
    else:
        str1 += c
rawstr = str1 + str2
print(rawstr)
 

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