How to select an item from a list just by knowing what its position is inside the list.
If the list is
[a,b,c,d,e,f,g]
is there a function that operates something like this
theoreticalfunction(list,position in list) and then the output is the item that was in the selected position
>Solution :
If you know the index of an element on the list you can use listName[index] to get it’s value.
For example
lst = [a,b,c,d,e]
print(lst[0]) # returns a