I have a string called hand = ["KC", "9D", "10S", "jH","11H", "0S", "HC", "Q2S", "100D", "1C", "2D2"]. I only want ["KC", "9D", "10S", "jH"] to return True and the rest of the string to return False. How would I do that?
I've currently written this
import re
def checkCard():
hand = ["KC", "9D", "10S", "jH","11H", "0S", "HC", "Q2S", "100D", "1C", "2D2"]
stack = map(bool, hand)
print(list(stack))
checkCard()
handis not a string it's a list of strings and what do you mean by return your function doesn't return anything you are just printing"KC", "9D", "10S", "jH","11H", "0S", "HC", "Q2S", "100D", "1C", "2D2" "True", "True","True","True","False","False","False","False","False","False","False"