python private class variable code example
Example: private class method python
class Student:
def __init__(self):
pass
# The double underscore in the front makes it private
def __print_name(self):
return print("private")
# proof of use
def print_name(self):
return print("public")