Skip to content

Convert a dictionary to a list of tuples in Python


dictionary = {'name': 'Anand', 'age': 30, 'sex': 'Male'}

#[('age', 30), ('name', 'Anand'), ('sex', 'Male')]

See also  Get SHA 512 of a string in Python

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.