How python traverses lists and indexes
Editor to share with you how python traverses the list and index, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Traversing lists and indexes
# # items = 'zero one two three'.split () # method 1i = 0for item in items:print I, itemi + = searching method 2for i in range (len (items)): print I, items [I] # # recommend items =' zero one two three'.split () for I, item in enumerate (items): print I, item is all the contents of the article "how python traverses the list and Index". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!