标签:
刚玩玩python,这尼玛,不理解,难道是按数字排序,慢慢发现!!
源码如下:
menu={‘1.‘:‘add to sum‘}
menu[’2.‘]=‘averg to numbers‘
menu[‘3.‘]=‘exit‘
结果:
1 add to sum
3 exit
2 averg to numbers
源码如下:
menu={1:‘add to sum‘}
menu[2]=‘averg to numbers‘
menu[3]=‘exit‘
结果:
1 add to sum
2 averg to numbers
3 exit
标签:
原文地址:http://www.cnblogs.com/langdexuming/p/4254378.html