with open('partite.txt', 'r') as r:
for line in sorted(r):
print(line, end='')
2017年01月18日 15:38 GMT-05:00 Smith <smith at smith.it>:
> On 18/01/2017 21:34, MRAB wrote:
>>> If you're wondering about the blank lines, it's because the lines end
>> with '\n', which starts a new line, and the print function also starts a
>> new line after printing the string.
>>>> Try stripping the '\n' off the end of the line read in with the .rstrip
>> method.
>>>> Thank you for your kind cooperation
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
Atentamente
Germán A. Fajardo G.