Python: Difference between revisions
(→Syntax) |
|||
Line 36: | Line 36: | ||
<syntaxhighlight lang="python"> | <syntaxhighlight lang="python"> | ||
myfun(*tuple) | myfun(*tuple) | ||
</syntaxhighlight> | |||
====For loops==== | |||
<syntaxhighlight lang="python"> | |||
# Normal for loop | |||
for i in range(5): | |||
pass | |||
# 2D for loop | |||
for i, j in np.ndindex((5, 5)): | |||
pass | |||
</syntaxhighlight> | </syntaxhighlight> | ||