107k views
0 votes
what is printed by the following code? shapes=['circle', 'rectangle','diamond', 'square', 'line'] print(shapes[2][ 2])

User Hyperrjas
by
7.9k points

1 Answer

3 votes

Final answer:

The code prints the character 'a'.

Step-by-step explanation:

The following code prints the character at index 2 of the string 'diamond' which is 'a'.

User Terel
by
8.5k points