🔥 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

frozenset Data Type in Python

It is exactly same as set except that it is immutable. 

Hence we cannot use add or remove functions.


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

>>> fs-frozenset(s)

>>> type(fs)

<class 'frozenset'> 5) >>> fs

frozenset((40, 10, 20, 30))

>>> for i in fs:print(i)

40 10 20 30

>>> fs.add(70)

AttributeError: 'frozenset' object has no attribute 'add' 

>>> fs.remove(10)

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


No comments:

Post a Comment

Thank you Very Much.For Given Comment

Free 51 Websites for Learning Education and Courses

🛑 లక్à°·à°²ు à°–à°°్à°šుà°ªెà°Ÿ్à°Ÿి à°•ాà°²ేà°œీà°²్à°²ో à°¨ేà°°్à°šుà°•ోà°²ేà°¨ి à°µిà°·à°¯ాలను, à°«్à°°ీà°—ా à°¨ేà°°్à°ªింà°šే 51 à°…à°¦్à°­ుతమైà°¨ à°µెà°¬్‌à°¸ైà°Ÿ్à°²ు ఇవే! 🛑 à°Žà°¡్à°¯ుà°•ేà°·à°¨్ and à°•ోà°°్à°¸ుà°²ు: Co...