Deleting Tuples
Tuples are immutable and cannot be deleted. You cannot delete or remove items from a tuple. But deleting tuple entirely is possible by using the keyword
The output of this code will be (ācā, ādā).
š Read Online
#Python #python_3
āāāāāāāāāāāāā
Join @python_bds for more cool data science materials.
*This channel belongs to @bigdataspecialist group
Tuples are immutable and cannot be deleted. You cannot delete or remove items from a tuple. But deleting tuple entirely is possible by using the keyword
delSlicing of Tuple
To fetch specific sets of sub-elements from tuple or list, we use this unique function called slicing. Slicing is not only applicable to tuple but also for array and list.
x = ("a", "b","c", "d", "e")
print(x[2:4])
The output of this code will be (ācā, ādā).
š Read Online
#Python #python_3
āāāāāāāāāāāāā
Join @python_bds for more cool data science materials.
*This channel belongs to @bigdataspecialist group
Guru99
Python TUPLE ā Pack, Unpack, Compare, Slicing, Delete, Key
A Python tuple is just like a list of a sequence of immutable objects. Learn Packing, Unpacking, Comparing, Slicing and Deleting of tuples with examples in this tutorial.
Forwarded from Free programming books
Please open Telegram to view this post
VIEW IN TELEGRAM