美文网首页
2018-01-05

2018-01-05

作者: 饭饭H | 来源:发表于2018-01-05 14:58 被阅读0次

今天看Python

以下程序:

coding=utf-8

!/usr/bin/python

tinydict={'name':'join','code':6734,'dept':'sales'}
print tinydict.keys() #输出所有的键
print tinydict.values() #输出所有的值

以下为输出结果:
['dept', 'code', 'name'] ['sales', 6734, 'john']

也就是在解释的时候是从后往前的....

相关文章

网友评论

      本文标题:2018-01-05

      本文链接:https://www.haomeiwen.com/subject/kycsnxtx.html