get value and index of list code example
Example 1: get value from index python
# To get value from index in a list:
x = ["Foo", "Bar", "Roblox"]
print(x[0]) # Output: Foo
Example 2: python get index and value from list
test = [ 'test 1', 'test 2', 'test 3' ]
for index, value in enumerate( test ):
print( index, value )