Access an arbitrary element in a dictionary in Python

If mydict is not empty, I access an arbitrary element as:

mydict[list(mydict.keys())[0]]

Is there any better way to do this?

← Назад к списку