Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open("input.txt", encoding='utf-8') as f:
- data = []
- for line in f:
- title, price = line.strip().split(';')
- data.append((int(price), title))
- data.sort()
- money = 1000
- i = 0
- k = 0
- while money > 0 and i < len(data):
- print(data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement