#-*-coding:utf-8-*-
#创建字段
d={'name':'cheng','age':20,'sex':'female'}
#创建空列表
a=[]
#将字典中键和值循环取出添加到列表中
for i in d.keys():
a.append(i)
a.append(d[i])
print a

 

相关文章:

  • 2021-05-18
  • 2022-01-20
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2021-07-02
  • 2021-04-27
  • 2022-12-23
相关资源
相似解决方案