Hello. How do you get an item in a list using its index? I am trying to remove a number of items from a list like this:
Edit: I've just done some testing, and I've just found the (listName)[indexNumber] method / thing. Is this the answer to my question? Example:
for i in range(len(credentialsList)-3): credentialsList.remove(credentialsList.index(i))but clearly I have done something wrong as I get a ValueError as index(i) expects ' i ' to be the value of a definite item in the list, so how can I do what I am trying to do?
Edit: I've just done some testing, and I've just found the (listName)[indexNumber] method / thing. Is this the answer to my question? Example:
exampleList=["example1","example2","example3"]