摘要: %s 用str()方法处理对象%r 用rper()方法处理对象,打印时能够重现它所代表的对象(rper()unambiguously recreate the object it represents)例一:>>> print("Today is %s" % a)Today is sunday>>>... 阅读全文
posted @ 2015-04-01 18:56 牧歌- 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 让Python的经验更多一点Python while 1 和 while True 速度比较Python %s和%r的区别 阅读全文
posted @ 2015-04-01 13:16 牧歌- 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Referenceshttp://legacy.python.org/dev/peps/pep-0285/http://stackoverflow.com/questions/3815359/while-1-vs-for-whiletrue-why-is-there-a-difference本文内容... 阅读全文
posted @ 2015-04-01 13:14 牧歌- 阅读(5777) 评论(0) 推荐(1) 编辑