← All printables
Python · Modules 41–50

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

A free printable Python definitions worksheet with 37 key terms, built from the key terms of Advanced (Modules 41–50) — Sets – Operations, Nested Lists, Lists + Dictionaries, File Operations – Open, File Operations – Read, File Operations – Write and more. Print it or save it as a PDF — the answer key starts on its own page. No login needed.

Python Definitions Worksheet: Advanced (Modules 41–50)

Name:
Date:
Class:

Key terms

Write what each term means, in your own words.

1
List of dicts
2
list[i]['key']
3
Dict with list value
4
d['key'][i]
5
Set
6
set()
7
.add(item)
8
.remove(item)
9
Union
10
Intersection
11
Difference
12
Symmetric difference
13
open()
14
'r' mode
15
'w' mode
16
'a' mode
17
.read()
18
.readline()
19
.readlines()
20
for line in f:
21
.write(string)
22
.writelines(list)
23
FileNotFoundError
24
PermissionError
25
finally:
26
except ___Error:
27
Module
28
import module
29
from module import func
30
__name__
31
Class
32
Object
33
Instance
34
self
35
__init__
36
self.attribute
37
Constructor

Answer Key

Python · Modules 41–50 · Student wording will vary for definitions
1List of dicts — A list where each element is a dictionary like records.
2list[i]['key'] — Access a key in the i-th dictionary of the list.
3Dict with list value — A dictionary where one of its values is a list.
4d['key'][i] — Access the i-th item of a list stored in the dict.
5Set — An unordered collection of unique items in curly braces.
6set() — Creates an empty set - since {} would create a dict.
7.add(item) — Adds an item to the set.
8.remove(item) — Removes an item from the set - raises an error if not found.
9Union — Combines all items from both sets with no duplicates.
10Intersection — Returns only items that appear in BOTH sets.
11Difference — Returns items in the first set but NOT in the second.
12Symmetric difference — Returns items in either set but NOT in both.
13open() — Built-in function that opens a file.
14'r' mode — Read-only - the default mode for opening files.
15'w' mode — Write mode - creates or overwrites the file.
16'a' mode — Append mode - adds new content to the end of the file.
17.read() — Reads the entire file as one string.
18.readline() — Reads the next single line from the file.
19.readlines() — Returns a list of all lines in the file.
20for line in f: — Loop through the file one line at a time.
21.write(string) — Writes a string to the file.
22.writelines(list) — Writes a list of strings to the file.
23FileNotFoundError — Error when trying to read a file that doesn't exist.
24PermissionError — Error when you don't have access to the file.
25finally: — Block that always runs - used for cleanup.
26except ___Error: — Catches a specific type of error.
27Module — Any .py file that can be imported and reused.
28import module — Loads the module - use module.function() to access it.
29from module import func — Imports just one function - use func() directly.
30__name__ — '__main__' when run directly, or the module name when imported.
31Class — A blueprint that defines the structure of objects.
32Object — A specific instance created from a class.
33Instance — Another word for an object created from a class.
34self — Refers to the current object inside class methods.
35__init__ — Constructor method that runs automatically when an object is created.
36self.attribute — Creates or accesses an attribute on the object.
37Constructor — A method that initializes new objects - in Python this is __init__.

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, VCE Software Development - U3O1 - Programming, VCE Software Development - U4O1 - development and evaluation, 9-10 Digital Technologies: Data structures in Python, 9-10 Digital Technologies: Modular programs and algorithms, 9-10 Digital Technologies: Object-oriented programming, debugging and testing, VCE Applied Computing U1O2 Programming: Data structures, VCE Applied Computing U1O2 Programming: Object-oriented programming, 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 2 — Data and Programming Techniques, QCE Digital Solutions Unit 3 — Interactions Between Users, Data and Digital Systems, QCE Digital Solutions Unit 3 — Innovative Digital Solutions, QCE Digital Solutions Unit 4 — Complex Digital Data Exchange Problems and Solution Requirements, QCE Digital Solutions Unit 4 — Prototype Digital Data Exchanges, WA Computer Science ATAR Year 11 — Control Structures and Data Types, WA Computer Science ATAR Year 11 — Modular Programming, WA Computer Science ATAR Year 11 — Network Communications

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.