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 trialMalcolm Aldrin Masumba
3,689 PointsI 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 ?
my_list = []
for i in range(10):
my_list.append(10)
print(i)
2 Answers
KRIS NIKOLAISEN
54,971 PointsIt wants you to append the current value of i to my_list as you iterate.
my_list.append(i)
KRIS NIKOLAISEN
54,971 PointsThe instructions state: The body of the for loop should append the current value to the provided list. In your case this would be i.
Malcolm Aldrin Masumba
3,689 PointsI 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
Malcolm Aldrin Masumba
3,689 PointsMalcolm Aldrin Masumba
3,689 PointsThanks man. I get it now