Python Classroom Series – 03/Jul/2021

Json with Python

  • Lets write a python program which stores inventory to a json file
  • Refer Here for the first version of this program
  • Exercises:
    • If the file exists containing inventory data, donot get empty dictionary read dictionary from file.
    • Refer Here for the changeset
    • Ask for the user input and handle the code to acheive the functionality
    1 to add inventory items
    2 to update inventory items
          Enter id: 
          print product name
          change quantity
          change price
    3 to print inventory times
    • Do exception handling for this application

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin