I started with this approach but used str.split(). I have been doing Python for about 2 years now. Used .split various times, but I had no idea that split() and split(' ') had different behaviour.You learn something new every day.
what if str had spaces of different lengths?
nice and clean
Please use spoiler flag next time.
This comment is hidden because it contains spoiler information about the solution
Rounding requirement has been removed.
I disagree. An array of the same numbers is sorted, but it is ambiguous what direction it is sorted.
At the location where you should put the result, you've put None.
Where should the result go?