this is my code:
def search_people():
search = input("Who do you want to search for: ")
class people:
def __init__(self, full_name, birthday, telnum, other):
self.name = full_name
self.full_name = full_name
self.birthday = birthday #ddmmyyyy
self.telnum = telnum
self.other = other
Sudar = people("Fullname: Sudaravan Surenthiran", "Birhtday: 10/08/2004",
"Telephone number: 070 006 04 01",
"Other information: Loves chocolate"
So what i'm trying to do is if the person inputs the person's name for example 'sudar'. It should show the info using:
print(Sudar.name)
print(Sudar.birthday)
print(Sudar.telnum)
print(Sudar.other)
And if i search for other_person It should use:
print(other_person.name)
print(other_person.birthday)
print(other_person.telnum)
print(other_person.other)
I just want to know if there's any way to do this on python 3.6?