☞ We will work on the following operators in a dictionary.
1. Concatenation Operator 2. Replication Operator 3. Membership Operator
☞Concatenation(+) Operator :
D = {10:"Ten", 20:"Twenty"}+3 print(D)
D = {10:"Ten", 20:"Twenty"}+3 TypeError: unsupported operand type(s) for +: 'dict' and 'int'
☞Replication(*) Operator :
D = {10:"Ten", 20:"Twenty"}*3 print(D)
D = {10:"Ten", 20:"Twenty"}*3 TypeError: unsupported operand type(s) for *: 'dict' and 'int'
☞Membership (in,not in) Operator :
D1 = 20 in {10:"Ten", 20:"Twenty"} print (D1) D2 = 50 not in {10:"Ten", 20:"Twenty"} print (D2)
True True