← All printables
Python · Modules 31–40

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

A free printable Python definitions worksheet with 40 key terms, built from the key terms of Data Structures (Modules 31–40) — String Methods (upper, lower, replace…), String Formatting (.format()), Lists – Creation, Lists – Indexing, Lists – Slicing, Lists – Methods (append, remove, pop, insert) and more. Print it or save it as a PDF — the answer key starts on its own page. No login needed.

Python Definitions Worksheet: Data Structures (Modules 31–40)

Name:
Date:
Class:

Key terms

Write what each term means, in your own words.

1
.upper()
2
.lower()
3
.replace(old, new)
4
.strip()
5
{}
6
.format()
7
f-string
8
{:.2f}
9
List
10
[]
11
Element
12
len(list)
13
list[0]
14
list[-1]
15
list[i] = value
16
IndexError
17
list[start:stop]
18
list[:stop]
19
list[start:]
20
list[::step]
21
.append(item)
22
.insert(index, item)
23
.remove(value)
24
.pop()
25
Dictionary
26
Key
27
Value
28
dict[key]
29
.keys()
30
.values()
31
.items()
32
.get(key, default)
33
for key in d:
34
for v in d.values():
35
for k, v in d.items():
36
'key' in d
37
Nested list
38
grid[row][col]
39
Inner list
40
Nested loop

Answer Key

Python · Modules 31–40 · Student wording will vary for definitions
1.upper() — Returns the string in all uppercase letters.
2.lower() — Returns the string in all lowercase letters.
3.replace(old, new) — Replaces all occurrences of old with new.
4.strip() — Removes whitespace from both ends of the string.
5{} — Placeholder in .format() that is replaced by the argument value.
6.format() — Method that fills {} placeholders in a string with values.
7f-string — f'...' lets you insert variables directly inside {curly braces}.
8{:.2f} — Format specifier that shows a number to 2 decimal places.
9List — An ordered collection of items in square brackets.
10[] — Creates an empty list.
11Element — An individual item inside a list.
12len(list) — Returns the number of elements in the list.
13list[0] — Access the first item in the list.
14list[-1] — Access the last item in the list.
15list[i] = value — Change the item at index i to a new value.
16IndexError — Error when the index is out of range.
17list[start:stop] — Get items from start up to but not including stop.
18list[:stop] — Get items from the beginning up to stop.
19list[start:] — Get items from start to the end of the list.
20list[::step] — Get every step-th item from the list.
21.append(item) — Adds an item to the end of the list.
22.insert(index, item) — Inserts an item at a specific position in the list.
23.remove(value) — Removes the first occurrence of a value from the list.
24.pop() — Removes and returns the last item, or the item at the given index.
25Dictionary — A collection of key-value pairs in curly braces {}.
26Key — The label used to look up a value in a dictionary.
27Value — The data stored under a key.
28dict[key] — Access the value associated with that key.
29.keys() — Returns all keys in the dictionary.
30.values() — Returns all values in the dictionary.
31.items() — Returns key-value pairs as tuples.
32.get(key, default) — Safely accesses a key and returns default if missing.
33for key in d: — Iterate through all keys in the dictionary.
34for v in d.values(): — Iterate through all values in the dictionary.
35for k, v in d.items(): — Iterate through key-value pairs with unpacking.
36'key' in d — Check if a key exists in the dictionary returning True or False.
37Nested list — A list that contains other lists as elements.
38grid[row][col] — Access an item using two indices: row then column.
39Inner list — A list that is an element of the outer list.
40Nested loop — A loop inside another loop used to access all items.

Modules this definitions worksheet covers

Every module has its own free printable worksheet with an answer key, and students can practise the same terms interactively on Cloodit.

Part of: Python Coding, SC in Schools - Introduction to Coding - Python, VCE Software Development - U3O1 - Programming, VCE Software Development - U4O1 - development and evaluation, 7-8 Digital Technologies: Programming in Python, 9-10 Digital Technologies: Data structures in Python, VCE Applied Computing U1O2 Programming: Data structures, IGCSE Computer Science 0478 — 7c Pseudocode and Flowcharts, ACARA Digital Technologies Years 9–10 — Testing and Validating Programs, ACARA Digital Technologies Years 9–10 — Modular and Object-Oriented Programming (Python), QCE Digital Solutions Unit 1 — Algorithms and Programming Techniques, QCE Digital Solutions Unit 1 — Programmed Solutions, QCE Digital Solutions Unit 3 — Interactions Between Users, Data and Digital Systems, QCE Digital Solutions Unit 4 — Prototype Digital Data Exchanges, WA Computer Science ATAR Year 11 — Control Structures and Data Types

More Python printables

This printable is free — no login needed.

Free classroom tools, no account: Hangman · Random Team Generator · Random Name Picker Wheel · Seating Plan Maker

Make a free class, give it a journey, and you also get:

Create a free teacher account →

No credit card. No setup fee. Make a class and invite students in under three minutes.