For example, num = [4, 6, 2, 5, 7]
for i in num:
for j in num:
j = num[i+1]
Is there a way to find if i is in the 0 position, 1 position, 2 position, ... so that I can make it were j = what position i is in +1
I also want to make it were if, lets say i was in position 1; if i == i+1: num.remove(i)
I already tried i+1 just doing i plus one and i could do a bunch of if statements and just make it do 1 over but i have like 4 variable for the for loop all in different position of i and I'm worried it will say list(x) out of index. I also tried .find put it didn't work for a list.
Also, I need to make it as too were it doesn’t change the original value of the integer so that I can add them up, would I have to make too lists.