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 trial1 Answer
Chris Freeman
Treehouse Moderator 68,454 PointsHey Shali Dan, regarding the multidimensional lists video, there are two variables used in the loop:
-
week
is a list of values from the listtravel_values
. Each loop will be the next week’s value starting at the 0-th week. - workweek_number is a manually incremented value to keep track number of times the loop has executed. It is used only as a print value and not to index in the lists.
Later in the courses, you will near about the enumerate() function that automatically produces a loop counter along with an item from an iterable.
Post back if you need more help. Good luck!!!
Shali Dan
741 PointsShali Dan
741 Pointsthank you for the explanation!