Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created Sep 16, 2020
Embed
What would you like to do?
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