14 Mutable objects in python | Python tutorial beginner to advance

preview_player
Показать описание
2) Mutable Objects in python:
-------------------
- The obejcts which allows to modify the contents of that object, those objects are called as mutable object.

- We can create two different mutable objecst with same value/data/content.

Program:
---------
x=[10,20,30]
print(x)
print(type(x))
print(id(x))

x[1]=123
print(x)
print(type(x))
print(id(x))

y=[10,20,30]
print(y)
print(type(y))
print(id(y))

- list, set, dict objects are mutable objects.

- Mutable objects performance is low when comapred to immuatable objects.

- Applying iterations on mutable objecs takes more time. python tutorial,python,python for beginners,python tutorial for beginners,learn python,python crash course,python 2020,python tutorial for beginners full,python (programming language),python basics,python course,python from scratch,python full course,python language,python programming,python programming language,python programming tutorial,getting started with python,learn python programming,web development,python projects,machine learning, python tutorial,python,python for beginners,python tutorial for beginners,learn python,python crash course,python 2020,python tutorial for beginners full,python (programming language),python basics,python course,python from scratch,python full course,python language,python programming,python programming language,python programming tutorial,getting started with python,learn python programming,web development,python projects,machine learning,source code
Рекомендации по теме