Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- You Have purchased 8 Bananas of 40$
- You have purchased 2 Apples of 2$
- line = f.readlines()
- option = int(input('Select line number to edit or remove:'))
- selectedline = line[option-1]
- print(selectedline,'[Selected]')
- action = int(input('''What you want to do
- [1] Edit Quantity
- [2] Remove
- '''))
- edit = selectedline.split()
- if action == 1:
- qty = int(input('Enter new quanity'))
- edit[-1] = edit[3]/edit[-1]
- edit[3] = qty
- edit[-1] = qty
- print(edit)
Add Comment
Please, Sign In to add comment