Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. with open("input.txt", encoding='utf-8') as f:
  2. data = []
  3. for line in f:
  4. title, price = line.strip().split(';')
  5. data.append((int(price), title))
  6. data.sort()
  7. money = 1000
  8. i = 0
  9. k = 0
  10. while money > 0 and i < len(data):
  11.  
  12.  
  13. print(data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement