This new exercise was basically meant to read only the numbers from the file (specifically, integers).
The template only included the letters/string "abc" but the code handles anything that isn’t a number because I used the isdigit function
He mentioned that this exercise would involve try-except blocks, but I didn’t quite understand why at first. After completing my version, wondering about his comment, and imagining how it might work, I searched for the code block on Google; using the AI-generated overview, I learned about the different types of exceptions (basically, the errors that could occur).
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.