1.函数是第一等公民
In [104]: enumerate(['a','b','c','d']) Out[104]: <enumerate at 0x7f75f7b07ca8> In [105]: for k,v in enumerate(['a','b','c','d']): .....: print (k) .....: print (v) .....: 0 a 1 b 2 c 3 d