+ 1

Hy plis help me, I've tried to find a way, but can't find it

Write a program in python to sort the values ​​below Input: 25 22 19 36 77 50 32 Output: 19 22 25 32 36 50 77 Thank you 🥺

21st Jan 2023, 1:35 AM
Evan Greanaldy
Evan Greanaldy - avatar
6 Respostas
+ 5
First try yourself and post your attempt here
21st Jan 2023, 2:20 AM
Hasnain [ACTIVE CHALLENGER]
Hasnain [ACTIVE CHALLENGER] - avatar
+ 5
https://stackoverflow.com/questions/11178061/print-list-without-brackets-in-a-single-row There are several options to solve your print format problem.
21st Jan 2023, 3:42 AM
Ausgrindtube
Ausgrindtube - avatar
+ 1
I sold try sir , like this? https://imgur.com/gallery/dkwHzDK
21st Jan 2023, 2:27 AM
Evan Greanaldy
Evan Greanaldy - avatar
0
Add the values in list and then use sort function. And if you want to iterate the same, write end="" in print function
21st Jan 2023, 1:59 PM
viswajeet
viswajeet - avatar
0
#Let I create a code for you. import re values= "25 22 19 36 77 50 32" pattern=r"\d+" lst=re.findall(pattern, values) lst.sort() for val in lst: print(val, end=" ")
21st Jan 2023, 2:05 PM
viswajeet
viswajeet - avatar
21st Jan 2023, 2:08 PM
viswajeet
viswajeet - avatar