Use list(dict)[0] instead of list(dict.keys())[0]