Advertisement
PuppeyG

python list comprehension

Sep 18th, 2022
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. multiples = []
  2. for x in range(1, 11):
  3.     multiples.append(x * 7)
  4. print(multiples)
  5.  
  6. mult_comperh = [x * 7 for x in range(1, 11)]
  7. print(mult_comperh)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement