SlideShare a Scribd company logo
4
Most read
5
Most read
6
Most read
Data Types in Python
Swipe
Type Casting/Type Conversion in Python
Int(x)
int (10)
int(10.20)
int('10')
int('10.20')
int(0b1010)
int(true)
int(A)
int(true)
float(x) complex(x,y) bool() str()
float (10)
float (10.20)
float ('10')
float ('10.20')
float (0b1010)
float (true)
float (A)
float (true)
complex(10)
complex(10.20)
complex('10')
complex('10.20')
complex(0b1010)
complex(true)
complex(A)
complex(true)
bool(0)
bool(0.0)
book(0+0j)
bool('')
bool([])
bool(0)
bool(none)
bool(* *)
str(complex(10,20))
srt('python')
str('10.20')
Immutable vs Mutable Data Types in
Python
By now you may have heard the phrase “everything in
Python is an object”.
Objects are abstraction for data, and Python has an
amazing variety of data structures that you can use to
represent data, or combine them to create your own
custom data.
A first fundamental distinction that Python makes on data
is about whether or not the value of an object changes.
If the value can change, the object is called mutable, while
if the value cannot change, the object is called immutable.
( ) Vs [ ]
Immutable vs Mutable Data Types in
Python
Mutable Data Type in Python
Mutable
Data Types
List
Bytes arrays
Sets
Dictionaries
Note:-
Mutable sequences can be changed after creation. Some of
Python’s mutable data types are: lists, byte arrays, sets, and
dictionaries.
Immutable Data Type in Python
Immutable
Data Types
Numeric Data Types
Strings and Bytes
Frozen Sets
Tuples
Note:-
Immutable can not be changed after creation. Some
immutable types include numeric data types, strings, bytes,
frozen sets, and tuples.
Mutable vs Immutable Data
type in Python
Stay Tuned with
Topics for next Post

More Related Content

PPTX
Fundamentals of Python Programming
PPTX
11 Unit 1 Chapter 03 Data Handling
PDF
Python tuple
PPTX
File Handling Python
PPT
Intro to Python
PDF
Python Flow Control
PPTX
Chapter 08 data file handling
Fundamentals of Python Programming
11 Unit 1 Chapter 03 Data Handling
Python tuple
File Handling Python
Intro to Python
Python Flow Control
Chapter 08 data file handling

What's hot (20)

PPT
Python Programming Language
PPTX
Phython Programming Language
PPTX
Regular expressions in Python
PDF
Python basic
PPTX
Binary Tree Traversal
PPTX
Python Functions
PDF
C++ Files and Streams
PPTX
python conditional statement.pptx
PPTX
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
PDF
Searching and Sorting Techniques in Data Structure
PPTX
List in Python
PPTX
Array in c++
PPT
Data structures using c
PDF
Python final ppt
PPTX
File handling in Python
PDF
PPT
Input and output in C++
PDF
Python If Else | If Else Statement In Python | Edureka
PPTX
Event In JavaScript
Python Programming Language
Phython Programming Language
Regular expressions in Python
Python basic
Binary Tree Traversal
Python Functions
C++ Files and Streams
python conditional statement.pptx
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Searching and Sorting Techniques in Data Structure
List in Python
Array in c++
Data structures using c
Python final ppt
File handling in Python
Input and output in C++
Python If Else | If Else Statement In Python | Edureka
Event In JavaScript
Ad

Similar to Immutable vs mutable data types in python (20)

PDF
Mutable data types in python
PPTX
Data types in python lecture (2)
PPTX
009 Data Handling class 11 -converted.pptx
PDF
4. Data Handling computer shcience pdf s
PDF
Python-03| Data types
PDF
Data types in python
PPTX
data typesppt.pptxcccccccccccccccccccccccccccccccccccccccccccccc
PDF
Data Handling_XI_Finall for grade 11 cbse board
PPTX
009 Data Handling .pptx
PPTX
Data types and type conversion Gungun ledhu give oggy Outlook
PPTX
data handling revision.pptx
PPTX
Various datatypes_operators supported in python
PDF
Immutable data type in python
PPTX
introduction to python,datatypes,operators
PPTX
Python Data Types in depth description .pptx
PPTX
Data Types In Python.pptx
PPTX
Data_Types_in_Python.pptx hubby outfit you bhi
PPTX
Data_Types_in_Python_Presentation (1).pptx
PPTX
Python Data Types,numbers.pptx
PPTX
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptx
Mutable data types in python
Data types in python lecture (2)
009 Data Handling class 11 -converted.pptx
4. Data Handling computer shcience pdf s
Python-03| Data types
Data types in python
data typesppt.pptxcccccccccccccccccccccccccccccccccccccccccccccc
Data Handling_XI_Finall for grade 11 cbse board
009 Data Handling .pptx
Data types and type conversion Gungun ledhu give oggy Outlook
data handling revision.pptx
Various datatypes_operators supported in python
Immutable data type in python
introduction to python,datatypes,operators
Python Data Types in depth description .pptx
Data Types In Python.pptx
Data_Types_in_Python.pptx hubby outfit you bhi
Data_Types_in_Python_Presentation (1).pptx
Python Data Types,numbers.pptx
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptx
Ad

More from Learnbay Datascience (20)

PDF
Top data science projects
PDF
Python my SQL - create table
PDF
Python my SQL - create database
PDF
Python my sql database connection
PDF
Python - mySOL
PDF
AI - Issues and Terminology
PDF
AI - Fuzzy Logic Systems
PDF
AI - working of an ns
PDF
Artificial Intelligence- Neural Networks
PDF
AI - Robotics
PDF
Applications of expert system
PDF
Components of expert systems
PDF
Artificial intelligence - expert systems
PDF
AI - natural language processing
PDF
Ai popular search algorithms
PDF
AI - Agents & Environments
PDF
Artificial intelligence - research areas
PDF
Artificial intelligence composed
PDF
Artificial intelligence intelligent systems
PDF
Applications of ai
Top data science projects
Python my SQL - create table
Python my SQL - create database
Python my sql database connection
Python - mySOL
AI - Issues and Terminology
AI - Fuzzy Logic Systems
AI - working of an ns
Artificial Intelligence- Neural Networks
AI - Robotics
Applications of expert system
Components of expert systems
Artificial intelligence - expert systems
AI - natural language processing
Ai popular search algorithms
AI - Agents & Environments
Artificial intelligence - research areas
Artificial intelligence composed
Artificial intelligence intelligent systems
Applications of ai

Recently uploaded (20)

PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
master seminar digital applications in india
PPTX
Lesson notes of climatology university.
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Pharma ospi slides which help in ospi learning
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Classroom Observation Tools for Teachers
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Pre independence Education in Inndia.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
01-Introduction-to-Information-Management.pdf
master seminar digital applications in india
Lesson notes of climatology university.
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Pharma ospi slides which help in ospi learning
Abdominal Access Techniques with Prof. Dr. R K Mishra
STATICS OF THE RIGID BODIES Hibbelers.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Classroom Observation Tools for Teachers
102 student loan defaulters named and shamed – Is someone you know on the list?
Anesthesia in Laparoscopic Surgery in India
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Microbial disease of the cardiovascular and lymphatic systems
Pre independence Education in Inndia.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
GDM (1) (1).pptx small presentation for students
Final Presentation General Medicine 03-08-2024.pptx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf

Immutable vs mutable data types in python

  • 1. Data Types in Python Swipe
  • 2. Type Casting/Type Conversion in Python Int(x) int (10) int(10.20) int('10') int('10.20') int(0b1010) int(true) int(A) int(true) float(x) complex(x,y) bool() str() float (10) float (10.20) float ('10') float ('10.20') float (0b1010) float (true) float (A) float (true) complex(10) complex(10.20) complex('10') complex('10.20') complex(0b1010) complex(true) complex(A) complex(true) bool(0) bool(0.0) book(0+0j) bool('') bool([]) bool(0) bool(none) bool(* *) str(complex(10,20)) srt('python') str('10.20')
  • 3. Immutable vs Mutable Data Types in Python By now you may have heard the phrase “everything in Python is an object”. Objects are abstraction for data, and Python has an amazing variety of data structures that you can use to represent data, or combine them to create your own custom data.
  • 4. A first fundamental distinction that Python makes on data is about whether or not the value of an object changes. If the value can change, the object is called mutable, while if the value cannot change, the object is called immutable. ( ) Vs [ ] Immutable vs Mutable Data Types in Python
  • 5. Mutable Data Type in Python Mutable Data Types List Bytes arrays Sets Dictionaries Note:- Mutable sequences can be changed after creation. Some of Python’s mutable data types are: lists, byte arrays, sets, and dictionaries.
  • 6. Immutable Data Type in Python Immutable Data Types Numeric Data Types Strings and Bytes Frozen Sets Tuples Note:- Immutable can not be changed after creation. Some immutable types include numeric data types, strings, bytes, frozen sets, and tuples.
  • 7. Mutable vs Immutable Data type in Python Stay Tuned with Topics for next Post