Understanding
Python Data
Objects With
Memes
Abhi maza
aayega na bhidu KYA BAAT HAI
Lists
List in Python are declared using square brackets [ ]
1) Lists can hold data of any data type as well as any
data object into it.
2) Additionally, they are mutable which basically means,
once a list is declared,
3) You may still add a new element,
4) Delete an existing element
5) and even Replace an existing element
Lists
Whenever we try to
add, delete or replace an
element in a list, the list
be like:
Ye bhi theek hai
Tuple
Tuple in Python are declared using round brackets ( )
1) Tuples are just like lists (can hold data of any data
type or any data object into it) but are immutable.
2) This means, once a tuple has been declared,
3) We can’t Add a new element to it.
4) Neither Delete an existing element.
5) Nor Replace an existing element.
Whenever we try to add, delete or replace an element in a
tuple the list be like:
Tuple Tuple
Isme meri expertise Main nahi krne
nahi hai , Sorry dunga
Dictionaries
Dictionary in Python are declared using curly
brackets { key: value, key: value }
A dictionary can hold data in key-value format
How data is captured in a dictionary?
Kidhar jana hai
Key
Value
Key
Sets
Sets in Python are declared using curly brackets
{ element-1, element-2, element-3 }
A set can hold only unique data points which get
sorted automatically within it.
If sets was our house-help
Hey “sets” can Where are my
you store my That was easy other pair of
socks? socks?
Me Sets
Strings
Strings in Python are declared using inverted
commas " " , ' ', ''' '''
Strings are used to preserve textual,
alphanumeric data but can hold anything in it.
Strings are immutable data objects.
When we talk about String being a Data Object
String
String
String is a data object See , Nobody Cares
A Quick Summary About
All Data Objects
Duplicate Indexing /
Ordered Mutable Elements Slicing
Sets
List
Tuple
Don’t Forget To
SAVE
&
Follow For More