2017-02-14 16:57:56 -05:00
|
|
|
try:
|
|
|
|
enumerate
|
|
|
|
except:
|
|
|
|
import sys
|
|
|
|
print("SKIP")
|
|
|
|
sys.exit()
|
|
|
|
|
2014-01-14 18:55:01 -05:00
|
|
|
print(list(enumerate([])))
|
|
|
|
print(list(enumerate([1, 2, 3])))
|
|
|
|
print(list(enumerate([1, 2, 3], 5)))
|
|
|
|
print(list(enumerate([1, 2, 3], -5)))
|
2016-02-12 18:38:30 -05:00
|
|
|
print(list(enumerate(range(100))))
|
2014-01-14 18:55:01 -05:00
|
|
|
|
2014-05-06 12:38:54 -04:00
|
|
|
# specifying args with keywords
|
|
|
|
print(list(enumerate([1, 2, 3], start=1)))
|
|
|
|
print(list(enumerate(iterable=[1, 2, 3])))
|
|
|
|
print(list(enumerate(iterable=[1, 2, 3], start=1)))
|