in eat.txt there is the following content:
02:26:31 14:44:45 09:53:27
14:17:35 12:33:44 09:30:12
I'm reversing the order of the elements in the following way:
import sys
with open 'eat.txt as f:
lines = f.read().strip().splitlines()
for line in lines:
out = ' '.join(sorted(line.split(), reverse=True))
print(out)
Output:
14:44:45 09:53:27 02:26:31
14:17:35 12:33:44 09:30:12
Why does it only change the first line and the second does not?