I am trying to do a two things with this program.
Firstly, check if the input is in the list,
and secondly, to remove that item from the list after its inputed, thus changing the list and allowing the program to happen again. I want to be able to eventually remove all items from the list.
I am very new to coding, all help is very welcome. Thanks so much!
lista = (1,2,3,4,5,6,7,8,9,10)
def aturn ():
print("\n\n\nPlayer A's turn...")
numA = int(input())
if numA in lista:
print ("Yes")
lista.remove(str(numA))
else:
print("No")
aturn()
aturn()
When I run this code. I get the following error and I am not sure why.
AttributeError: 'tuple' object has no attribute 'remove'