Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> spam = ['dog', 'cat', 'bat', 'mouse']
- >>> spam
- ['dog', 'cat', 'bat', 'mouse']
- >>> for i in range(len(spam)): print(i, spam[i])
- ...
- 0 dog
- 1 cat
- 2 bat
- 3 mouse
- >>> for index, value in enumerate(spam): print(index, value)
- ...
- 0 dog
- 1 cat
- 2 bat
- 3 mouse
- >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement