25.3k views
0 votes
 myLIst = [1, 2, 45, 66, 77, 88]

White the line of code which will print the 3rd element in myList.

 myLIst = [1, 2, 45, 66, 77, 88] White the line of code which will print the 3rd-example-1
User Erwaman
by
8.0k points

1 Answer

5 votes

Answer:

print(myList[2])

Step-by-step explanation:

Hi,

To print the third element of the list myList, we can use the following line of code: print(myList[2]).

The index for the third element is 2 because element indexing in Python starts at 0. So if you want to print the n-th element in the list, the index will be n-1.

Good luck!

User Marco Martignone
by
8.3k points