Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to make a separate list of values from dictionaries in python

# Python code to demonstrate
# to split dictionary
# into keys and values
  
# initialising _dictionary
ini_dict = {'a' : 'akshat', 'b' : 'bhuvan', 'c': 'chandan'}
  
# printing iniial_dictionary
print("intial_dictionary", str(ini_dict))
  
# split dictionary into keys and values
keys = ini_dict.keys()
values = ini_dict.values()
  
# printing keys and values separately
print ("keys : ", str(keys))
print ("values : ", str(values))
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #separate #list #values #dictionaries #python
ADD COMMENT
Topic
Name
5+5 =