Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
BLESSING TASHINGA GURENJE
5,793 Pointshow do I loop through the group members
introducing lists
1 Answer
Steven Parker
243,656 PointsYou didn't mention which course you're taking (a link to the page is always helpful), but "looping through" something like a list is done by iteration, and the "for" statement is good for this.
So for example, if you have a list of things named "group" and you want to do something with each item in it, you might construct a loop like this:
for member in group:
# do something here with each "member"
Hopefully you can get it now. If you need more specific help, be sure to include a link to the page you are working with, and any code you have written so far. If the page has a "get help" button, using it to start a forum question will usually add both the link and your code to the question automatically.