Print out all the ages at once


#1

hi, if I have a list of items in the list e.g…[[“John”,“24”],[“Harvey”,“22”],[“Nathan”,“19”],[“Jeff”,“17”]], how would I code so that it prints out all the ages at once efficiently? Thank you.


#2

This question was covered in the forums a couple weeks ago. Will see if I can find the topic. Post this question in the appropriate topic category associated with the lesson. If this is homework, then post your question in the Corner Bar.


#3

this is a home investigation, so where can I find the forum?


#4

List that contains the people who’s age is equal or younger


#5

however, the one before required the user to input the data and I need it to iterate through the list and print all the ages in one go without having to do repeated print functions, is that possible?


#6

Sounds like a job for a “for loop”?


#7

hi thanks I think I found the solution


#8

Care to share what you came up with?