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

I am failing to realize what this question really wants me to do. First if i am to append, which value am i to add

The variable my_list is empty, am i to fill it ?

iterating_ranges.py
my_list = []
for i in range(10):
    my_list.append(10)
    print(i)

2 Answers

It wants you to append the current value of i to my_list as you iterate.

my_list.append(i)

Thanks man. I get it now

The instructions state: The body of the for loop should append the current value to the provided list. In your case this would be i.

I got that part as shown in my code.. What about the list i am to append, do i have to fill it up or that int(10) is the list