遍历数组的python代码
其他语言中,比如C#,我们通常遍历数组是的方法是:
<!–
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
–>for (int i = 0; i list.Length; i++)
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
–>for item in sequence:
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
–>for index in range(len(sequence)):
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
–>for index, item in enumerate(sequence):
process(index, item)
以上就是Python enumerate遍历数组应用的详细内容,更多请关注【创想鸟】其它相关文章!