#py2
print 'd'
#py3
print('d')
dict = {}
dict['1one1'] = 'one'
dict[2] = 'two'
#py2
print tinydict.keys()
# 输出所有键:['1one1', 2]
print tinydict.values()
# 输出所有值:['one', 'two']
#py3
print (dict.keys())
#输出: dict_keys(['1one1', 2])
print (tinydict.values())
#输出:dict_values(['one', 'two'])
#运算符 /
#Python2.x 里,整数除整数,只能得出整数
>>> 1/2
0
>>> 1.0/2
0.5
>>> 1/float(2)
0.5
#python3
a=1/2
print (a)
0.5