Return rows 0 and 3 of cups, stacked

NumPy · from Fancy indexing

a[[0, 2]]a[rows, cols]np.ix_np.takenp.add.atalways copies

Putting the kettle on…

Starting up…

Exercise 2

Return rows 0 and 3 of cups, stacked.

your answer
stuck? the lesson behind it
Fancy indexing
Indexing with a list of positions — and why two lists zip instead of crossing.