I have the following code. I want to start the for loop at the index found in the for loop. essentially, I'm slicing the list (R_sigma11
, etc.) into two to search for duplicate numbers in that list and saving their indexes. I keep getting TypeError: 'int' object is not subscriptable
. How can I get past this?
index = []
start = 0
bam = len(R_min_MST_list)
for n in range(bam[start:]):
if R_min_MST_list[n] == 0:
index.append(R_sigma11.index(R_min_MST))
elif R_min_MST_list[n] == 1:
index.append(R_sigma22.index(R_min_MST))
elif R_min_MST_list[n] == 2:
index.append(R_Tau12.index(R_min_MST))
start += index[0]