Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file_in = open("irclog.txt")
- file_out = open("irclog_sorted.txt", "w")
- linelist = []
- sortedlist = sorted(file_in, key=len)
- for line in sortedlist:
- print(line)
- file_out.write(line)
- file_in.close()
- file_out.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement