These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Basically, you want to create a list from a dictionary, is that correct? Now, do you want to merge all keys and values of your dictionary into a list or create two separate lists, one for your keys and one for your values?
Let’s say you want to create one list containing both the key and values of your dictionary:
for key, value indict.iteritems():
temp =[key,value]
dictlist.append(temp)
If you want to create different lists for both your key and your value, you can try :
# Create a list of keyslist(dict.keys())# Create a list of valueslist(dict.values())
Regards,
KFSys
The developer cloud
Scale up as you grow — whether you're running one virtual machine or ten thousand.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.