要素を None に変更すればよい。
例
arr = [1,2,3,4,5]
print(str(arr))
for i in range(len(arr)):
arr[i] = None
print(str(arr))
結果
[1, 2, 3, 4, 5]
[None, None, None, None, None]
雑記
投稿日:
要素を None に変更すればよい。
arr = [1,2,3,4,5]
print(str(arr))
for i in range(len(arr)):
arr[i] = None
print(str(arr))
[1, 2, 3, 4, 5]
[None, None, None, None, None]
執筆者:seyanen
関連記事
凡例(legend)の表示位置を変更するには、axis の legend の loc を設定する。 次のリンクhttps://matplotlib.org/stable/api/_as_gen/mat …
matplotlib で折れ線グラフの下部に色をつけて塗りつぶす方法
pyplot の fill_between を使う。 例 from matplotlib import pyplot as plt data_x = [25,26,27] data_y = & …
axhline, axvline を使ってx,y軸に平行な線を描くことができる。 https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot …
2023/01/18
matplotlib のグラフ作成と gnuplot との対応 比較
2022/10/14
pythonで配列(リスト)の、ある要素がわかっているときにその次の要素を取得する方法。