Informatics Practices
Which of the following functions will return key-value pairs of the dictionary in the form of list of tuples?
- key()
- values()
- items()
- get()
Related Questions
Which function is used to remove all items from a particular dictionary?
- clear()
- pop()
- delete()
- rem()
What will be the output of the following Python code snippet?
d1 = { "amit" :40, "jatin" :45} d2 = { "amit" :466, "jatin" :45} d1 > d2- True
- False
- Error
- None
Select the correct option to get the values of marks key:
Student={ "name" : "Emma", "class" :11, "sec": "a", "marks" :76}- Student.get(3)
- Student.get("marks")
- Student["marks"]
- Both 2 and 3
Consider the given code:
D1={1: 'India', 2: 'Russia', 3: 'World'} D2={'School' : 'EOIS' , 'Place ' : 'Moscow'} print(D1.update (D2) )What will be the output of the above code:
- None
- {1: 'India' , 2: 'Russia' , 3: 'World' , 'School' : 'EOIS' , 'Place' : 'Moscow'}
- Error
- None of these