initial commit
This commit is contained in:
commit
39f56a3b10
83 files changed
+3583
No files matched your search
@@ -0,0 +1,15 @@
|
||||
class Student:
|
||||
def __init__(self,name,s_id):
|
||||
self.name = name
|
||||
self.s_id = s_id
|
||||
def __eq__(self,other):
|
||||
if self.name == other.name and self.s_id == other.s_id:
|
||||
return True
|
||||
return False
|
||||
|
||||
s1=Student("A",1)
|
||||
s2=Student("A",1)
|
||||
if s1 == s2:
|
||||
print("equal")
|
||||
else:
|
||||
print("not equal")
|
||||
Reference in new issue
Block a user