13,420
edits
Changes
→PART 3 - Iterating Over Lists
:'''Perform the Following Steps'''
::Let's take a moment to understand how the '''for''' loop works. The for loop will store data within a temporary variable (in the demonstration below, the variable called: '''item''') and run code that are indented below the for loop. This operation will repeat until ALL contained items within the list have been used.<br><br>
:#Issue the following in the ipython shell:<source>
list_of_numbers = [ 1, 5, 2, 6, 8, 5, 10, 2 ]