Computer Science, asked by st67215, 3 months ago

State the output of the following code:
a = {
a[1] = 1
a['1'] = 2
a[1]= a[1]+1
print(a)​

Answers

Answered by Anonymous
10

Answer:

class 'list'>

As you can see that type([]) is giving us list. This means that '[]' is a list as mentioned above.

Index → Every member in a list is known by its position, starting from 0. For example, in the list [3,4,2,5], index will start from 0. So, index of 3 is 0, 4 is 1, 2 is 2 and 5 is 3. Thus, the index started from 0 and went up to 3.

Similar questions