Accessing dict_keys() and dict.values() in python 3
python3 how to get the elements of the dict.keys() and dict.values()
Python 3
mydict = {'a': 'one', 'b': 'two', 'c': 'three'}
mykeys = [*mydict] #list of keys
myvals = [*mydict.values()] #list of values
print(mykeys)
print(myvals)
Output
['a', 'b', 'c']
['one', 'two', 'three']
References:
https://stackoverflow.com/questions/18552001/accessing-dict-keys-element-by-index-in-python3