Find the output of the code given below: 4
D={'U1':'Programming', 'U2':'Data structures', ‘U3':'Files', 'U4':'RDBMS','U5':'Networks'}
(a) print(len(D))
(b) print(D.pop('U1'))
(c) print(D.popitem())
(d) print(D.pop('U3'))
(e) print(D.get('U4'))
(f) print('U2' in D)
(g) print('Programming' in D)
(h) print('U3' not in D)
Answers
Output:
a. 5
b. Programming
c. ('U5', 'Networks')
d. Files
e. RDBMS
f. True
g. False
h. True
Here are the output for the following codes in Python.
- 5
- Programming.
- ('U5', 'Networks')
- Files
- RDBMS
- True
- False
- True