Python_Institute
PCAP-31-03 · Question #19
Assuming that the code below has been placed inside a file named code.py and executed successfully, which of the following expressions evaluate to True?
The correct answer is C. ClassA.__module__ == '__main__'. See the full explanation below for the reasoning.
Question
Assuming that the code below has been placed inside a file named code.py and executed successfully, which of the following expressions evaluate to True?
Exhibit
Options
- Astr(Object) == 'Object'
- Bname == 'code.py'
- CClassA.module == 'main'
- Dlen(ClassB.bases) ==2
How the community answered
(29 responses)- A17% (5)
- B3% (1)
- C69% (20)
- D10% (3)
Community Discussion
No community discussion yet for this question.
