fix(curriculum): fixed typo in class and object lecture (#63585)

This commit is contained in:
alex reynoso
2025-11-06 15:53:27 -06:00
committed by GitHub
parent 3c25055567
commit 64da68fdfd

View File

@@ -71,7 +71,7 @@ attr_name = input('Enter the attribute you want to see: ')
print(getattr(person, attr_name, 'Attribute not found'))
```
In this case, if the user types in `name`, they see `John Doe`, and if they type in `age`, they see `30`. And If they type something that doesn't exist in the class like `email`, they see `Attribute not found`.
In this case, if the user types in `name`, they see `John Doe`, and if they type in `age`, they see `30`. And if they type something that doesn't exist in the class like `email`, they see `Attribute not found`.
This is exactly where dynamic attribute handling shines. It lets your code respond to input and data it hasn't seen before.