Medium
Sort by Size, Ignoring the Sign
Read integers and sort them by absolute value with
sorted(a, key=abs). Ties keep their original order. Print the result.Input
One line.
Output
One line.
Sample 1
Input
-5 3 -1 2
Output
-1 2 3 -5
Sample 2
Input
0 -0 1
Output
0 0 1
Output appears here