+ 1
I'm going to shop and I'm entering product name in the computer then display the product details this how to code in python
2 Réponses
+ 2
Try to use dictionary: {product 1: description 1, product 2: description 2, etc}. Then you should enter a product name and print dictionary[product_name]. As for me, it's the easiest solution.
+ 1
You can use simple text files to store or a database . if you want to keep it simple , use dictionary or lists , OrderedList is good for it . You can make a search system using difflib (get_close_matches) too . But having a database is best and more practical