🔥 Welcome to my blog! Latest updates available now. Visit daily! 🔥 🔥 Click Here for Latest Updates – Visit My Blog 🔥
🔥 Latest Updates 📊 GP Grade Finder 📢 Government Services Info 🆕 New Schemes Updates

tuple data type in Python


-->tuple data type is exactly same as list data type except that it is immutable.i.e we cannot change values.


-->Tuple elements can be represented within parenthesis.


Example:

>>>t=(10,20,30,40)

>>>type(t)

<class 'tuple'>

>>>t[0]=100

TypeError: 'tuple' object does not support item assignment 

>>>t.append("siddu")

AttributeError: 'tuple' object has no attribute 'append'

>>>t.remove(10)

AttributeError: 'tuple' object has no attribute 'remove'


Note: tuple is the read only version of list

No comments:

Post a Comment

Thank you Very Much.For Given Comment

Birth & Death Registration Rules 2026

జనన, మరణాà°² నమోà°¦ు à°µిà°·à°¯ంà°²ో 2026 à°…à°•్à°Ÿోబర్ 1 à°¨ుంà°šి à°•ొà°¤్à°¤ à°¨ిà°¬ంధనలు అమల్à°²ోà°•ి à°°ాà°¨ుà°¨్à°¨ాà°¯ి. 🔹 21 à°°ోà°œుà°²్à°²ోà°ªు: à°¸ాà°§ాà°°à°£ à°°ిà°œిà°¸్à°Ÿ్à°°ేà°·à°¨్ 🔹 21 à°°ోà°œుà°² తర్à°µాà°¤...