Shift Numbers
Given a string, write a program to move all the numbers in it to its end.
Input
The input will contain a string A.
Output
The output should contain a string after moving all the numbers in it to its end.
Explanation
For example, if the given string A is “1good23morning456” the output should be “goodmorning123456,” as it contains numbers at the end.
Sample Input 1
com876binat25ion
Sample Output 1
combination87625
Code:
word=input()
char=""
digits=""
for i in word:
if i.isdigit():
digits+=i
else:
char+=i
print("{}{}".format(char,digits))
Input
rav12i3ki76r789an
Output
ravikiran12376789