📜  如何在 python 代码示例中从字典中创建单独的值列表

📅  最后修改于: 2022-03-11 14:46:52.909000             🧑  作者: Mango

代码示例1
# 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))