Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- inFile = open('input', 'r', encoding='utf8')
- outFile = open('output', 'w', encoding='utf8')
- lines = inFile.readlines()
- ans = []
- for line in lines:
- currLine = list(map(str, line.split()))
- currLine.pop(2)
- ans.append(' '.join(currLine))
- ans.sort()
- for line in ans:
- print(line, file=outFile)
- inFile.close()
- outFile.close()
Advertisement
Add Comment
Please, Sign In to add comment