Answer to Question #193701 in Python for pranith

Question #193701

Rearrange Numbers in String


Given a string, write a program to re-arrange all the numbers appearing in the string in decreasing order. Note: There will not be any negative numbers or numbers with the decimal part.



Input

The input will be a single line containing a string.



Output

The output should be a single line containing the modified string with all the numbers in the string re-ordered in decreasing order.



Explanation

For example, if the given string is "I am 5 years and 11 months old", the numbers are 5, 11. Your code should print the sentence after re-ordering the numbers as "I am 11 years and 5 months old".


Sample Input

I am 5 years and 11 months old


Sample Output

I am 11 years and 5 months old


Sample Input

I am 17 I want 18 but 20or24 ok


Sample Output

I am 24 I want 20 but 18or17 ok



Sample Input

I have learnt 3% of Python 4 for 45 days


Sample Output

I have learnt 45% of Python 4 for 3 days


1
Expert's answer
2021-05-16T18:39:29-0400
Dear pranith, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

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

pranith
15.05.21, 17:23

sample input 2 and 3 are not working

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS