I’m currently completing a go fish program and python and am struggling to determine how to “check” if there are 4 cards of the same rank (ace, 2, etc) in one hand and remove them. My current code is as follows,
def check(hand, score):
for i in range(len(hand)- 1):
j = hand[i]
if j == 4:
print("you have completed a set :)")
for j in range(4):
hand.remove[j]
score += 1
else:
print("no sets have been found ☹")
Any suggestions?