0
My question is about find_age() method in this code
personList is a list of objects, after adding 3 people and their information to the list i want the user to look for an age inside the list and see if he she gets a match (positions inside the list). For that i wrote the find_age() method but its not working. Plz check the code: https://code.sololearn.com/cHSG42NUYWxS/?ref=app
9 Answers
+ 8
Lenoname ,
you have defined functions to get the age, but they never get called. see my suggestion at the end of the code:
https://code.sololearn.com/c0TGo7cbkJ7a/?ref=app
+ 5
Lenoname ,
no problem, you can use enumerate(...) in the comprehension.
happy coding!
0
what about it doesn't work? And can you supply some base inputs on your code so we don't have to input every time?
0
Slick ok check again i, ignore the comment code, i get â<built in methodâŠ..â
0
with what input? please add it
0
Slick also if u can rewrite the code in #comments that would awesome.
0
great add input
0
Slick doesnt matter , if its in the list it should be printed out , if its not its probably going to show empty brackets
0
Lothar i want their position in the list of objects, ex: [0] or [1]