M

Mr. Dubey • 52.70K Points
Coach

Q. Why are local variable names beginning with an underscore discouraged?

(A) they are used to indicate a private variables of a class
(B) they confuse the interpreter
(C) they are used to indicate global variables
(D) they slow down execution
Share

Explanation by: Mr. Dubey
 as python has no concept of private variables, leading underscores are used to indicate variables that must not be accessed from outside the class.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics