I am trying to create a specialist dominos programme, where the __str__ method of each hand is populated by dominos such as "1|6\t3|6\t6|6"
To start I need to find the hand with "6|6" and wrote the following code (extract):
the code "print(player)" prints the string correctly, but the line "if double in player" returns the error "TypeError: argument of type 'Player_Hand' is not iterable"Code:while not starter: for i in range(6, -1, -1): double = str(i) + "|" + str(i) for player in self.players: if double in player: starter = True
What am I doing wrong? Sorry for the noob question...