Skip to Content
Nextra 4.0 is released 🎉
Glossary

Use this page to look up terms you see in the lessons. If something sounds unfamiliar, check here for a quick definition.

Keyword

A word that Python reserves for its own use. You can’t use it as a variable name, function name, or the like. Examples: if, else, while, for, def, class.

Identifier

The name you give to something in your code—a variable, function, or class. It has to follow rules (e.g. start with a letter or underscore, no spaces) and can’t be the same as a keyword.

Variable

A name that holds a value. You can change that value as your program runs. For example, score = 0 creates a variable called score and gives it the value 0.

Function

A reusable block of code that performs a specific task. Functions can take input parameters and return output values.

Class

A blueprint for building objects. It describes what data those objects hold (attributes) and what they can do (methods). You’ll use classes when you get into more advanced Python.

Object

A value in your program that has data and can perform actions (methods). Often an object is created from a class; “object” is the general word for one of those.

Instance

A specific object created from a class. Each instance can have its own unique values for the properties defined in the class. We usually use the term “instance” to refer to an object when we want to emphasize that it is a specific occurrence of a class.

Attribute

A variable that belongs to an object or class. Attributes hold data that describes the object or class.

Method

A function that belongs to an object or class.

Mutable

Something you can change after you create it. In Python, lists and dictionaries are mutable—you can add, remove, or change items.

Immutable

Something that can’t be changed after you create it. In Python, strings and integers are immutable. If you “change” a string, you’re really creating a new one.

Syntax

The rules for how you write code so Python can read it. Miss a colon or a parenthesis? That’s a syntax error.

Semantics

What your code does—its meaning and behavior. If the syntax is correct but the program behaves the wrong way, that’s a semantics (logic) issue.

Execute

To run your code so it actually does what you wrote. When you run a Python program, the interpreter reads your code line by line and executes it.

Parameter

A variable that is used in a function definition to represent the input that the function will receive when it is called. Parameters are placeholders for the actual values (arguments) that will be passed to the function.

Argument

A value that is passed to a function when it is called. Arguments are the actual values that correspond to the parameters defined in the function.

Return

To give back a value from a function after it has completed its task. A function can use the return statement to specify the value that should be returned to the caller.

Return Value

The value that a function gives back after it has completed its task. This value can be used in other parts of the program.

Pass

To give a value to a parameter when a function is called. For example, when you call greet_user("Alice"), the argument "Alice" is passed to the name parameter.

Last updated on