Pythonのスライスに出てくるカンマの使い方2018/9/27 / 1 min readView more blogs with the tag pythonTable of Contents#はじめに#ポイントはじめに Pythonのスライスについて整理します import numpya = numpy.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) print(a[:, 0]) # [1 4 7]print(a[:1, 0]) # [1]print(a[:1, 1]) # [2]print(a[:2, 1]) # [2 5]print(a[:3, 1]) # [2 5 8] ポイント :の後ろの数値で何個目のリストかを指定 ,で区切って、指定した各リストの何番目かを指定