Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

List get both index and value.

bb = ['one', 'two', 'three', 'infinity']

for ii, vv in enumerate(bb):
    print(ii, vv)

# 0 one
# 1 two
# 2 three
# 3 infinity
Source by xahlee.info #
 
PREVIOUS NEXT
Tagged: #List #index
ADD COMMENT
Topic
Name
6+8 =