Concept
try runs code that might fail; except catches a named error and decides what happens next. Catching the specific exception you expect keeps real bugs visible.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show try and except doing its job.
def parse_age(text):
try:
age = int(text)
except ValueError:
return None
else:
return age
finally:
print("checked", text)
print(parse_age("41"), parse_age("old"))Writing a bare except: or except Exception: around everything. It swallows typos, missing names and keyboard interrupts along with the error you meant to handle.
Your roadmap puts these before try and except, unless you already know them.
Once a session shows you understand try and except, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.
Topics that build on try and except.