Write a program to convert given dictonary to list of list key value pairs


Topic: Write a program to convert given dictonary to list of list key value pairs

Solution

d = {'Food':'Fish&Chips','2012':'Olympics','Capital':'London'}
list_key_value = [ [k,v] for k, v in d.items() ]
print(f'lsit_key_value:{list_key_value}')



List all Python Programs