219k views
1 vote
This is your code.

>>> A = [21, 'dog', 'red']
>>> B = [35, 'cat', 'blue')
>>> C = [12, 'fish', 'green']
>>> E = (A, B, C]
What is the value of E[0][1]?
O 35
dog
0 21
O cat

User Cordelia
by
5.7k points

2 Answers

4 votes

Answer:

dog

Step-by-step explanation:

right on edge

User Sindre
by
5.1k points
6 votes

Answer:

dog

Step-by-step explanation:

Given the code :

>>> A = [21, 'dog', 'red']

>>> B = [35, 'cat', 'blue')

>>> C = [12, 'fish', 'green']

>>> E = [A, B, C]

the value of E[0][1]

Here, square boxes is used to select the value at E[0] ; the output is then used to select the value at index 1 of E[0] output.

Note that, indexing starts at 0; hence first list element is 0, then, 1, 2, and so on.

At

E[0] ; list E, index 0 (first element in the list) , gives an output A

Then, A[1] ; list A, index 1 (second element in the list) gives 'dog'

User Henry
by
5.4k points