In Python, to create a private attribute in a class, you prefix the attribute name with _______.
- @private
- __private
- _private
- private:
In Python, a private attribute is created by prefixing the attribute name with a double underscore, like "__private".
Loading...
Related Quiz
- _______ is the built-in Python exception for an error in the program logic.
- You are tasked with implementing a data structure that can insert, delete, and retrieve an element in constant time. Which data structure would you choose to implement this?
- What mode should you open a file in to write to it without deleting its existing content?
- To represent binary data in Python, you would use the ____ data type.
- Which command is used in PDB (Python Debugger) to continue execution until the next breakpoint is encountered?