摘要: import keyword import string alp = string.letters +'_' nums = string.digits print "welcome to identifier check v1.0." print "you have to enter two char to identifier." keywords= keyword.kwlist myinp... 阅读全文
posted @ 2016-06-21 10:33 你好呀。 阅读(177) 评论(0) 推荐(0) 编辑
摘要: s = 'abcde' for i in [None] + range(-1,-len(s),-1): print s[:i] #abcde #abcd #abc #ab #a 阅读全文
posted @ 2016-06-21 09:48 你好呀。 阅读(149) 评论(0) 推荐(0) 编辑