We use Python 3.6

go back Level: Advanced (img: AV / score: 4) level Bite 58. Using argparse to interface with a grocery cart

10 out of 10 users completed this Bite ...
Will you be Pythonista #11 to crack this Bite?
Average Bite difficulty 1-10 rating: 3.0
» You can do it! 😌

Below is a Groceries class with add/delete/show/search methods.

You as a Python Developer are asked to give your users a command line interface so they can use the program. In real life we would have a persistent DB behind it, but let's focus on practicing argparse.

If new to argparse you might want to check out Bites 56 and 57 first.

The program should work as shown here.

Good luck and have fun!

Github login button