What is immutable in Python?


Python defines variety of data types of objects. These objects are stored in memory. Contents of some objects can be changed after they are created while others can't be changed. Numeric objects such as integer, float and complex number objects occupy the memory and memory contents can not be changed. Such objects are called immutable. String and dictionary objects are also immutable. Tuple is also immutable. List object however is mutable because items in a list object can be modified, deleted or added in a list.

Updated on: 30-Jul-2019

556 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements