Answer to Question #310868 in Python for Fe 2

Question #310868

Shift numbers -2




Input



1good23morning456

1
Expert's answer
2022-03-15T12:12:35-0400
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'

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