List, Tuple, Set, Dictionary Methods
List, Tuple, Set, Dictionary Methods
Dictionary
methods
Lists
Python list is an ordered sequence of items.
The items in the tuple are ordered and that order willn’t
ordered change.
we cannot change, add or remove items after the tuple has
Unchangeable been created.
heterogenous The items of the tuple can be of different data type.
Convert tuple into list. Remove item from the list and then
Remove items from convert list back into Tuple. Or use del() method
Tuple to remove tuple.
When we create a tuple, we normally assign values to it. This is
Unpack Tuple called "packing" a tuple.
But, in Python, we are also allowed to extract the values back into
variables. This is called "unpacking"
The items in the set will be in different order each time you
unordered access the set.
unchangeable We can’t change the set items.
Key-value pair Key is the index which helps to access value from it.
unique It stores unique values.