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)
Comments
Leave a comment