来自 @nedbat 的分享:
Ned Batchelder: Loop Like A Native
C样:
i = 0
while i < len(my_list):
v = my_list[i]
print v
i += 1
偏门:
for i in range(len(my_list)):
v = my_list[i]
print v
蠎样:
for v in my_list:
print …
mail
,github
or
gitlab
.
Tip me via
||
(ATOM)