In Python, there are two types of Objects.
Mutable: Mutable objects are modified, (i.e) objects are a changeable list, set, dict, etc are mutable.
mutable objects are easy to change.
list =["Tutorials ","Point", "Pvt","Ltd"] list= 'Tutorix' list
['Tutorials ', 'Point', 'Tutorix', 'Ltd']
list=['Car','Bike','Scooty','Bus','Metro'] list= 'Bicycle' list
['Car', 'Bike', 'Scooty', 'Bus', 'Bicycle']
Immutable: immutable objects are not modified (i.e) not changeable int, float, bool, str, tuple, Unicode, etc ... are immutable. immutable objects are expensive and difficult to change. a tuple is enclosed within the parenthesis tuples are immutable and can't be changed.
('1', '2', 'Python', 'Perl')
tuple=('1','2','Python','Perl') tuple='2019' tuple
TypeError Traceback (most recent call last) in 1 tuple=('1','2','Python','Perl') ----> 2 tuple='2019' 3 tuple TypeError: 'tuple' object does not support item assignment
tuple object cant be changed by seeing above output you get a clear understanding