fetch a value in a list in python 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 element by index
# To return the index of the first occurence of element x in lst
ind = lst.index(x)