Vidyalelo
Python · Q41

Classes and Objects in Python

Programming · Python · question 41

Q41

How can you create a private attribute in a Python class?

A.
By prefixing the attribute name with an underscore (_)
Answer
B.
By using the private keyword
C.
By using the hidden keyword
D.
By using the secure keyword

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board