if we have a dictionary named a
suppose a is like this:-
a = {
"name" : "Bihan",
"marks" : 99,
"sunjects" : ["Eng", "Math"],
"friends" : {
"Sourav" : "Android",
"Sachin" : "IOS"
}
}
Now if I do a.items() I will get each key-value pair in a tuple… a tuple for each key-value pair. but as a.keys() is iterable then I just want to know whats the data type of b is, where b = a.items() … Where does the Each of the tuples containing a key-value pair reside? Are they inside a list or all the tuples are inside a tuple???
If i do :- type(b) then its showing :-
dict_items([(‘name’, ‘Bihan’), (‘marks’, 99), (‘sunjects’, [‘Eng’, ‘Math’]), (‘friends’, {‘Sourav’: ‘Android’, ‘Sachin’: ‘IOS’})])…
What should I assume ?? is it b is a tuple containing a list which contains all the tuples ??? or something else???