I am making this simple code:
MyList=[] valueA=1 valueB=2 valueC=3 MyList.append (valueA) MyList.append (valueB) MyList.append (valueC) print (MyList) print ([My
[MyList] is a list consisting of a single item, which is MyList.
[MyList]
MyList
I don't know why you have wrapped MyList in another list. You need to call index on MyList itself:
index
print(MyList.index(valueB))
And the result will be 1, not 0, because valueB is the second item in MyList.
valueB