Question
In python, you have object kevin = Employee("kevin") , how do you check if kevin is an instance of the Employee class (or any of its parent classes)?
Answer
isinstance(kevin, Employee)
Question
In python, you have object kevin = Employee("kevin") , how do you check if kevin is an instance of the Employee class (or any of its parent classes)?
Question
In python, you have object kevin = Employee("kevin") , how do you check if kevin is an instance of the Employee class (or any of its parent classes)?
Answer
isinstance(kevin, Employee)
If you want to change selection, open document below and click on "Move attachment"
pdf
owner:
kkhosravi - (no access) - PYTHON_DATA_STRUCTURES_AND_ALGORITHMS.pdf, p44
Summary
status | not learned | | measured difficulty | 37% [default] | | last interval [days] | |
---|
repetition number in this series | 0 | | memorised on | | | scheduled repetition | |
---|
scheduled repetition interval | | | last repetition or drill | | | | |
---|
Details
No repetitions