0
Help solve the Python problem
Hello . I want the code to read the input 1 + 1 + 1 + 3 + 3 + 1 and print the output 1 + 1 + 1 + 1 + 3 + 3
3 Answers
+ 1
# Hello
str = input()
num = str.split()
num.sort()
for x in num:
print(x)
0
Take the input, split it by +, remove all spaces.. You will get list of numbers of string form, convert it into int types..
Sort list and convert to string by joining with " + "
0
سلام مصطفی من تازه برنامه ها را انداختم میخوام یاد بگیرم کمک میکنید