Question
Is Python list mutable?
Solution
β Verified
Yes, Python lists are mutable.
This means you can change a list after you create it. You can add, remove, or change items in the list.
my_list = [1, 2, 3]
my_list[0] = 10 # change first item
my_list.append(4) # add a new item
print(my_list) # prints [10, 2, 3, 4]
Click here to download practice questions on
Python Lists