I'm trying to check if a list that is contained within a class has an element and the 'in' key word is not working. Is there another way of doing this. I've typed an example of what I'm asking about. Please ignore spacing etc ,it's just an example. My problem is in checking if the list tools[] contains an element.
Class Player():
def __init__(self):
tools= []
player = Player()
player.tools.append('x')
####right here, is there another way of checking if the list contains the elements #####
If 'x' in player.tools:
pass