Short explanations of the terms used in our lessons. Go back to the lesson where a term first appears to read more. (10 terms)
The kind of a value, such as int, float, str or bool. Check it with type().
First appears in: Python for Beginners, lesson 3 "Variables and data types"
A value (dict) that maps keys to values, written like {"name": "Taro"}. Look up a value by its key.
First appears in: Python for Beginners, lesson 20 "Dictionary basics"
A string written as f"…{expression}…" that embeds the values of variables or expressions.
First appears in: Python for Beginners, lesson 6 "String methods and f-strings"
A named block of code. Define it with def; it takes arguments and returns a value with return.
First appears in: Python for Beginners, lesson 25 "Function basics (def, parameters, return values)"
The position of an item in a sequence. It starts at 0, and -1 means the last item.
First appears in: Python for Beginners, lesson 5 "String indexing and slicing"
A value that holds several values in order, written like [1, 2, 3]. You can add and change items later.
First appears in: Python for Beginners, lesson 16 "List basics"
Taking part of a sequence with [start:stop]. The stop position is not included.
First appears in: Python for Beginners, lesson 5 "String indexing and slicing"
A sequence of characters (str), written in ' or " quotes.
First appears in: Python for Beginners, lesson 3 "Variables and data types"
Changing a value into another data type, as int("3") turns a string into an integer.
First appears in: Python for Beginners, lesson 7 "input and type conversion"
A name that holds a value so you can use it later, as in x = 10.
First appears in: Python for Beginners, lesson 3 "Variables and data types"