The true mechanism behind private attributes in Python is a feature called _______.
- abstraction
- data hiding
- encapsulation
- name mangling
Python uses a technique called "name mangling" to make attributes private by adding a prefix to their names.
Loading...
Related Quiz
- Which keyword allows the creation of a block of code that always runs, regardless of exceptions?
- What would be the output of the following Python code? print(type([]))
- How can you call (or invoke) a function named example?
- The contextlib module provides a utility called _______ to create context managers using generator functions.
- How can you merge two DataFrames in Pandas based on a common column, ensuring that only the matching rows are included in the result?