Python reference desk
Python glossary
Simple definitions and small examples for the words you will meet while coding.
Variable
FoundationsA named container that stores a value for later use.
score = 10String
FoundationsText data written inside quotation marks.
message = 'Hello'Integer
FoundationsA whole number without a decimal point.
lives = 3Boolean
FoundationsA value that is either True or False.
door_open = FalseCondition
DecisionsAn expression that evaluates to True or False and guides a decision.
if score >= 100:Loop
RepetitionCode that repeats a sequence of instructions.
for item in items:List
CollectionsAn ordered collection that can hold many values.
colors = ['red', 'green']Function
FunctionsReusable code grouped under a name.
def greet(name):Parameter
FunctionsA value a function receives when it is called.
def greet(name):Return
FunctionsA statement that sends a value back from a function.
return total