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 Sequences Sequence Iteration Iterating over Ranges

MAMADOU BAH
MAMADOU BAH
2,522 Points

Range

Can some help figure this out I tried multiple codes nothing have worked?

iterating_ranges.py
my_list = ['i']
for i in range (0,10,1):
        print (my_list)

1 Answer

1) You should leave the my_list declaration as provided by the challenge

2) Within the loop you are to append the current value using syntax my_list.append(val). So in the case of your code this would be my_list.append(i)