KnowledgeBoat Logo

Computer Science

Find the errors. State reasons.

t = [1, "a", 9.2]
t[0] = 6

Python List Manipulation

4 Likes

Answer

There are no errors in this python code. Lists in python can contain elements of any type. As lists are mutable so t[0] = 6 is also valid.

Answered By

2 Likes


Related Questions