Pythonのスライスに出てくるカンマの使い方 2018年9月27日 / 1 min read View more blogs with the tag python Table 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] ポイント :の後ろの数値で何個目のリストかを指定 ,で区切って、指定した各リストの何番目かを指定