for loops Flashcards
1
Q
Code that produces multiples of 3, starting at 3 and containing only 20 values.
A
multiples_3 = [x * 3 for x in range(1, 21)]
print(multiples_3)
Code that produces multiples of 3, starting at 3 and containing only 20 values.
multiples_3 = [x * 3 for x in range(1, 21)]
print(multiples_3)