for
Iterates for each element in a sequence.
Syntax
for element in arr:
...Description
Goes through each element of sequences like a list, string or range, in order. Most often used with range() or a list.
Example
Loading editor…
Expected output
a b c 0 1 2
When to use?
Processing a list, repetitive tasks, generating a table/rows.