Skip to main content

9.9) Lists Comprehension: A For Loop In A Line (cont'd)


For the curious, if you want to understand what happens when you run this code, check out this python tutor example.
Notice the variable i pointing through each value in the list numbers. The result of the list comprehension is stored as a temporary variable before being assigned to the name doubles.