Created
November 6, 2021 16:25
-
-
Save ycui1/e053b5d93bfefb6a51ebdaee41c012d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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