Advertisement
Wow_Rasl

Untitled

Jan 24th, 2022
1,345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. import math
  2. inFile = open('input', 'r', encoding='utf8')
  3. outFile = open('output', 'w', encoding='utf8')
  4. lines = inFile.readlines()
  5. ans = []
  6. for line in lines:
  7.     currLine = list(map(str, line.split()))
  8.     currLine.pop(2)
  9.     ans.append(' '.join(currLine))
  10. ans.sort()
  11. for line in ans:
  12.     print(line, file=outFile)
  13. inFile.close()
  14. outFile.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement