This may sound like an unimportant question but finding patterns in Python is what helps me memorize syntax.
Why are the attributes in quotes e.g. 'age'? Am I going to have to remember when to use quotes around variables and when not to? Or is there a pattern that can help me remember?
Why are the attributes in quotes e.g. 'age'? Am I going to have to remember when to use quotes around variables and when not to? Or is there a pattern that can help me remember?
class Person: name = "John" age = 36 country = "Norway" x = getattr(Person, 'age')