标签:
s = ‘abcde‘ for i in [None] + range(-1,-len(s),-1): print s[:i] #abcde #abcd #abc #ab #a
循环切片操作
原文地址:http://www.cnblogs.com/code-world/p/5602597.html