how to get the first key in a dictionary within a dictionary python code example Example: access first element of dictionary python res = next(iter(test_dict))