Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

frozenset Data Type:

Vinay Rawal answered on April 1, 2023 Popularity 3/10 Helpfulness 1/10

Contents


More Related Answers

  • Python frozenset()
  • Python Frozenset operations
  • Syntax of Python Frozenset
  • Python Frozenset
  • what does frozen=True mean in python dataclasses
  • Python Frozenset

  • frozenset Data Type:

    0

    It is exactly same as set except that it is immutable. ֍ Hence we cannot use add or remove functions. 1) >>> s={10,20,30,40} 2) >>> fs=frozenset(s) 3) >>> type(fs) 4) 5) >>> fs 6) frozenset({40, 10, 20, 30}) 7) >>> for i in fs:print(i) 8) ... 9) 40 10) 10 11) 20 12) 30 13) 14) >>> fs.add(70) 15) AttributeError: 

    Popularity 3/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Apr 01 2023
    Vinay Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.