Multiple choice technology programming languages

How to initialize the variable with private scope ?

  1. Prefix the string 'private' to the variable name.

  2. initialize it with '_init_private'

  3. initialize it with double underscore '__'

  4. append the keyword 'pvt' before the variable.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Python uses name mangling with double underscore prefix (__) to indicate private variables. This makes the variable harder to access from outside the class, though it's still technically possible.