标签:
# -*- coding: utf-8 -*- #python 27 #xiaodeng #enumerate colours=[‘red‘,‘green‘,‘blue‘] for i,colour in enumerate(colours): print i,colour ‘‘‘ 0 red 1 green 2 blue ‘‘‘
enumerate
原文地址:http://www.cnblogs.com/dengyg200891/p/4909244.html