Answer the question
In order to leave comments, you need to log in
How to make a list of tuples from a list of dictionaries?
Hello.
What is the error in creating a list of tuples from a list of dictionaries?
lst = [{"a": 1}, {"b": 2}, {"c": 3}]
tuples = [tuple(x) for x in lst]
print(tuples)
[('a', ), ('b', ), ('c' ,)]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question