[Type A] Python Revision Tour-1 – Chapter 1

|
Table of Contents

15. What are immutable and mutable types? List immutable and mutable types of Python.

Immutable types are those whose values cannot be changed after creation, whereas mutable types are those whose values can be changed after creation.

Immutable types in Python include:

  • int
  • float
  • bool
  • tuple
  • str

Mutable types in Python include:

  • list
  • set
  • dictionary
"Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *