摘要:
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... 阅读全文
摘要:
s = 'abcde' for i in [None] + range(-1,-len(s),-1): print s[:i] #abcde #abcd #abc #ab #a 阅读全文