Python-lists

From wikipost
Revision as of 15:07, 17 December 2020 by Admin (talk | contribs)
Jump to navigationJump to search

parsing lists in python


just numbers

my_list = [28, 56, 45]

for item in my_list:
  print(item)

Output:

28
56
45


just words

my_list = ["green", "red", "blue"]

for item in my_list:
  print(item)

Output:

green
red
blue