主要来源于《Python 基础教程(第二版)》
- 原始字符串:r’string’
- raw_input(): 强制输入转换为string
- 迭代(iteration):依次对序列(其他)中的每个元素重复执行某些操作
- 索引(indexing):反向索引由-1开始
- 设置步长的分片:mylist[0: 10: 2]
跳出多层
for
循环:for a in xrange(10): for b in xrange(20): if something(a, b): # Break the inner loop... break else: # Continue if the inner loop wasn't broken. continue # Inner loop was broken, break the outer. break