Skip to content

Instantly share code, notes, and snippets.

@unixnme
Created May 29, 2018 13:11
class Contact(object):
def __init__(self, name, phone):
self.name = name
self.phone = phone
def equal(a: Contact, b: Contact) -> bool:
return a.name == b.name and a.phone == b.phone
a = Contact('tom', 123)
b = Contact('boy', 456)
print(equal(a,b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment