Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Basic class in Python3
#!/usr/bin/python3
class Phone:
number = "111-11-11"
def print_number(self):
print( "Phone number is: ", self.number )
my_phone = Phone()
my_phone.print_number()
input( "Press Enter to exit" )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.