Variables must start with a letter (uppercase or lowercase) or an underscore. This may be followed by any amount of letter, digits or underscores. (Variables with leading and trailing underscores, like __import__, are reservered for the language.) These are all valid variable names
Code:
p = "Potato" # p now refers to the string "Potato" bushels = 3 # bushels refers to the value 3 potatoes_per_bushel = 80 # potatoes_per_bushel refers to the value 80 total_potatoes = bushels * potatoes_per_bushel # 240 print "I have", total_potatoes, p
Output:
I have 240 Potato
This page based on Variables