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