Shift numbers -2
Input
1good23morning456
def shift_num(input1):
str1 = ''
str2 = ''
for i in input1:
if i.isnumeric() == True:
str1 = str1 + i
else:
str2 = str2+i
return str2 + str1
shift_num('1good23morning456')
'goodmorning123456'
Comments
Leave a comment