Skip to content

Instantly share code, notes, and snippets.

@ycui1
Created November 6, 2021 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ycui1/e053b5d93bfefb6a51ebdaee41c012d8 to your computer and use it in GitHub Desktop.
Save ycui1/e053b5d93bfefb6a51ebdaee41c012d8 to your computer and use it in GitHub Desktop.
class Student:
def __init__(self, name, age):
self.name = name
self.age = age
def __repr__(self):
return f"Student({self.name!r}, {self.age})"
def __str__(self):
return f"Student Name: {self.name}; Age: {self.age}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment