indexメソッドは、リストやタプルの中で、指定した要素が最初に現れる位置(インデックス)を返すメソッド。 サンプルコード python/index.py at main · ki-hi-ro/python some_list = [1, 2, 3, 4, 5] index = some_list.index(3) print(f"The index of 3 in the list is: {index}") some_tuple = (10, 20, 30, 40, 50) index = some_tuple.index(40) print(f"The index of 40 in the tuple is: {index}") 以下のコ…