Answers for "dictionary to tuple python"

1

tuple to dict

t = (1, 2)
d = dict([t])
Posted by: Guest on September-25-2020
-1

dictionary to tuple python

# Python code to convert dictionary into list of tuples
 
# Initialization of dictionary
dict = { 'Geeks': 10, 'for': 12, 'Geek': 31 }
 
# Converting into list of tuple
list = list(dict.items())
 
# Printing list of tuple
print(list)
Posted by: Guest on July-26-2021

Code answers related to "dictionary to tuple python"

Python Answers by Framework

Browse Popular Code Answers by Language