-2

x={1: [6, 3], 4: [6, 9]}

For example the result could return only the first key or the second key.

1 Answers1

-1

Convert the dictionary to a list of tuples and just access an element

key = list(x)[0]
Woody1193
  • 7,252
  • 5
  • 40
  • 90