Certified Associate in Python Programming (PCAP) — Question 74

If any of a class's components has a name that starts with two underscores (___), then:

Answer options

Correct answer: A

Explanation

When a class's component name starts with two underscores, Python applies name mangling to prevent naming conflicts in subclasses. Options B, C, and D are incorrect because they do not pertain to the naming conventions associated with underscores in Python; the name mangling is specifically related to encapsulation and not the type of variable or method.