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
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.104.53