To convert a dictionary to a list of tuples you can pass the dictionary items into list constructor and it would return a list of tuples.
dictionary = {'name': 'Anand', 'age': 30, 'sex': 'Male'}
print(list(dictionary.items()))
#[('age', 30), ('name', 'Anand'), ('sex', 'Male')]
Top comments (0)