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

Python Python Basics (Retired) Shopping List Shopping List

completing a loop and feeling quite lost :(

The task is asking me to fill in the blanks I have no idea how to do this each time I get it wrong. I need a clear answer. feeling lost.

Complete the for loop below:

my_list = [1, 2, 3, 4] ______________ num_______________ my_list: ... print(num) 1 2 3 4

1 Answer

Bryan Manhollan
PLUS
Bryan Manhollan
Courses Plus Student 7,863 Points

When I first started learning on here, some of these through me for a loop too, lol.

For this one it's looking for "for" and "in"

so essentially it would come out looking like:

my_list = [1,2,3,4]
for num in my_list:
  print(num)

which would then print out: 1 2 3 4

Hope that helps it make sense. Good Luck!