Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created September 16, 2020 22:05
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 IndhumathyChelliah/285048e24faf4a3dcda102703daf971c to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/285048e24faf4a3dcda102703daf971c to your computer and use it in GitHub Desktop.
class Student:
def __init__(self,name,rollno):
self.name=name
self.rollno=rollno
def __repr__(self):
return "{},{}".format(self.name,self.rollno)
s=Student("karthi",12)
print (s)#Output:karthi,12
print (dir(Student))
'''
Output:
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment