Lists are mutable data types in Python because the elements of the list can be modified, replaced, and the order of elements can be changed even after the list has been created.
An example list is mutable or immutable in Python
Simple example code once a list has been created can be modified, replaced or order of elements can be changed
Python Lists are also dynamic.
lst = ['A', 'B', 'C', 'D'] lst = "New" print(lst)
Output: If the list is immutable then TypeError will throw by the compiler.
Do comment if you have any doubts and suggestions on this Python List tutorial.
Note: IDE: PyCharm 2021.1.3 (Community Edition)
All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.
Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.