I have a list which is of type class people.
def class people:
name=""
age=0
class poeple has two data members name, age
I have a list of all person stating in the city as a list of objects of this class.list is called population
now i get an query to check if the person stays in the city.this is called queryperson
I used:
if(queryperson in population):
print( "person lives")
else:
print( "person does not live here")
However i always get person does not live here. Any clues on how to do this ?
Thank you for your help