Guest User

Untitled

a guest
May 26th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. You Have purchased 8 Bananas of 40$
  2. You have purchased 2 Apples of 2$
  3.  
  4. line = f.readlines()
  5. option = int(input('Select line number to edit or remove:'))
  6. selectedline = line[option-1]
  7. print(selectedline,'[Selected]')
  8. action = int(input('''What you want to do
  9. [1] Edit Quantity
  10. [2] Remove
  11. '''))
  12. edit = selectedline.split()
  13.  
  14. if action == 1:
  15. qty = int(input('Enter new quanity'))
  16. edit[-1] = edit[3]/edit[-1]
  17. edit[3] = qty
  18. edit[-1] = qty
  19. print(edit)
Add Comment
Please, Sign In to add comment