Answers for "python program to sort a text file all lines in alphabetical order"

1

python script to sort file content

with open('shopping.txt', 'r') as r:
    for line in sorted(r):
        print(line, end='')
Posted by: Guest on October-28-2020

Code answers related to "python program to sort a text file all lines in alphabetical order"

Python Answers by Framework

Browse Popular Code Answers by Language