(Apr-07-2020, 06:19 PM)ndc85430 Wrote: Well, think about it: if you didn't have quotes, you'd have
getattr(Person, age)Of course, Python would look for a variable calledage
. What else could it do?
The question isn't specific togetattr
, though.
I thought Python is looking for a variable called 'age' and it's displaying the results. What is Python looking for if not the variable?
I think I understand. Is it because the attributes are arguments and not variables.