Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = open('task.txt', 'r')
- n = {}
- for line in f:
- string = line.split()
- average = (int(string[3]) + int(string[4]) + int(string[5])) / 3
- date = string[2].split('.')
- string[1] += " |"
- string[2] += " |"
- string[3] += " " + string[4] + " " + string[5] + " ->" + str(average)
- string[5] = ""
- string[4] = str(int(date[0]) + int(date[1]) * 30 + int(date[2]) * 360)
- j = string[4]
- n[j] = string
- for key in sorted(n.keys(), reverse = True):
- print(n[key])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement