
上QQ阅读APP看书,第一时间看更新
Dereferencing an element
We can also dereference the elements of a tuple, so element number 2 again would be the third element, because we start counting from 0, and that will give me back the number 6 in the following screenshot:
y = (4, 5, 6)
y[2]
The output to the above code is as follows:
6