x is a list of 3 elements:
x[2] is the third element, a list with a single element:
x[2][0] is the first (and only) element from the previous list:
So yes, the first element of [2] is the integer "2".
[0, 1, [2]]
x[2] is the third element, a list with a single element:
[2]
x[2][0] is the first (and only) element from the previous list:
2
So yes, the first element of [2] is the integer "2".
>>> l = [2] >>> l[0] 2 >>> l.pop(0) 2