1

Of the basic types of python, which of those are mutable? From reviewing the docs it looks like:

  • list
  • set (though not frozenset)
  • dict

Are the only mutable types, and everything else is immutable, but I wasn't able to find a definitive list on this. Is the above correct, or am I missing any python types that are mutable?

asked Oct 24, 2019 at 3:45
1
  • Why did this question get negative voting? Commented Apr 30, 2021 at 10:38

2 Answers 2

2

Take a look to this page in documentation. Here you can find all information about mutability of most common types in Python.

P. S. It is rather comment than answer, but my reputation is too small to comment.

answered Mar 17, 2022 at 3:08

Comments

1
  1. Some of the mutable data types in Python are list, dictionary, set and user-defined classes.

  2. On the other hand, some of the immutable data types are int, float, decimal, bool, string, tuple, and range.

https://towardsdatascience.com/https-towardsdatascience-com-python-basics-mutable-vs-immutable-objects-829a0cb1530a[Source][1]

eyllanesc
245k19 gold badges204 silver badges282 bronze badges
answered Oct 24, 2019 at 3:52

3 Comments

"some of" does not sound like a definitive list.
The above LINK is not found
Here is some list :realpython.com/pointers-in-python saying dict set list

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.