I'm trying to make a program which you can add stuff to your shopping list.
shopping_list = ["Eggs", "Milk", "Bread"]
Now i know how to add and remove items, but how do i delete the string or number in a variable without losing the variable?
price = "£12"
If I do del price I destroy the variable.
If I try print price i get an error:
Traceback (most recent call last):
File "<pyshell#17>", line 1, in <module>
print price
NameError: name 'price' is not defined
print pricedo after your desired operation?price = ""