0

I have python dictionary like this:

d = {1:['x','y'], 2: ['a','b']}

I want to get all the values of dictionary. Doing

d.values()

gives me

[['x', 'y'], ['a', 'b']]

But I would like to have something like this -

['x', 'y', 'a', 'b']

How can I achieve this?

shweta
  • 107
  • 2
  • 14

0 Answers0