The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #937
In Python, functions are objects. So they have attributes like other objects. For instance:
def foo():
pass
setattr(foo, 'age', 23 )
setattr(foo, 'name', 'John Doe' )
print(getattr(foo, 'age'))
foo.gender ='male'
print(foo.gender)
print(foo.name)
print(foo.age)
(tutorialspoint.com/What-are-Python-function-attribute)
In Python, functions can have attributes.
— The Python Quiz (@thepythonquiz) August 23, 2021
False
True
π Comment the answer, like and retweet! #python
Question difficulty: π΅π΅π΅π΅π΅