How to iterate over list in python

From DevOps Notebook
Revision as of 22:57, 14 November 2019 by MilosZ (talk | contribs) (Created page with "Most simple way with for: <syntaxhiglight> # example list list = [1, 2, 22, 55, 29] # Using for loop for i in list: print(i) </syntaxhighlight>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Most simple way with for: <syntaxhiglight>

  1. example list

list = [1, 2, 22, 55, 29]

  1. Using for loop

for i in list: print(i)

</syntaxhighlight>