Python: Difference between revisions

168 bytes added ,  4 February 2020
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>