[Python] 고급 - Dict 및 Set(2) - Sequence(4)
Immutable Dict # immutable Dictfrom types import MappingProxyTyped = {'key1': 'value1'}f = dprint('f = d : ', d is f, d == f) # is 는 id 가 같은지 확인, == 는 값이 같은지 확인print('value & id: ', d, id(d))print('value & id: ', f, id(f))print()# Read Only(Immutable Dict 생성)d_frozen = MappingProxyType(d)print(d, id(d), type(d))print(d_frozen, id(d_frozen), type(d_frozen))print(d is d_frozen, d == d_frozen) # is..