Last active
May 4, 2017 05:07
-
-
Save Everfighting/88c66e9f496668dd06eadd28c4a9137c to your computer and use it in GitHub Desktop.
enumerate起始位置参数
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list1 = ["这", "是", "一个", "测试"] | |
for index, item in enumerate(list1, 1): | |
print index, item | |
#results | |
#1 这 | |
#2 是 | |
#3 一个 | |
#4 测试 | |
#修改了默认的起始位置 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment