Post

Sudo Learning
Sudo Learning@SudoLearning·
@Python_Dv The answer is A 🐍 dict.items() returns a list of the key-value pairs within a dictionary. Very helpful for when you want to iterate through each key-value pairs in a dictionary, instead of just listing out each key in the dictionary by using dict.keys().
English
0
0
1
5
Chávez
Chávez@j_c_studio·
@Python_Dv The items () method in the dictionary is used to return each item in a dictionary as tuples in a list, so the answer is B
English
0
0
1
49
Prem Prakash
Prem Prakash@4EverPrem·
@Python_Dv ([('a', 1), ('b', 2), ('c', 3)]). items() method returns a set-like object providing a view on dictionary's items
English
0
0
1
295
Rakesh Das
Rakesh Das@RakeshDas_18·
@Python_Dv B. [("a", 1), ("b", 2), ("c", 3)] is the correct answer. Reason: The output of the code is a view object that contains the key-value pairs of the dictionary x as tuples in a list. For example: dict_items([(‘a’, 1), (‘b’, 2), (‘c’, 3)]). (1)
English
1
0
0
10
Kode Gurukul
Kode Gurukul@kodegurukul·
@Python_Dv The items() method returns a view object that displays a list of a dictionary's key-value pairs, as tuples. Each tuple contains a key-value pair from the dictionary.
Kode Gurukul tweet media
English
0
0
3
200
Paylaş