Do you know about this in Tuple #python #coding #programming

preview_player
Показать описание
Hello Dear Coder,
This is something that every programmer should know in python. In this video we will learn about this useful feature that is available for tuple in python .

Stay tuned....

#python #programming #coding
Рекомендации по теме
Комментарии
Автор

as in the tuple has a pointer to the list which is mutable, got it

jyvben
Автор

it is also working if we insert dictionary.

tp=(1, 2, 3, {"address":"Mumbai"})
print(tp)
tp[3]["village"]="kolgoan"
print(tp)

puneetchauhan
Автор

Did not know that but makes perfect sense.

carlfranz
Автор

python is kinda weird😅 but this amazes me while we can modify a list(mutable) inside a tuple(immutable)

ytusr-korg
Автор

So basically a mutable object inside of an immutable object still behaves as a mutable object, got it

CattleRustlerOCN