B
B
bobs322020-08-13 10:24:09
Python
bobs32, 2020-08-13 10:24:09

How to turn a dict into a list?

There is a list, like:

[
  {
    a:1,
    b:2,
    c:3
  },
  {
    a1:4,
    b1:5,
    c1:6
  }
]

How can it be converted to [(2,3,1), (5,6,4)]?
I understand that somehow through map
I will be grateful for the help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2020-08-13
@bobs32

[tuple(d.values()) for d in l]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question