I've got a character for a blackjack game but python can't encode it. I've looked up a few things but have not found a good solution and need help.
The error:UnicodeEncodeError: 'charmap' codec can't encode character '\u2666' in position 5: character maps to undefined
Here's my code:
SUITES = ["♥", "♠", "♣", "♦"] RANKS = ['A','2','3','4','5','6','7','8','9','X','J','Q','K'] VALUES = [11,2,3,4,5,6,7,8,9,10,10,10,10]
class Card: def __init__(self, suit, rank): self.suit = suit self.rank = rank self.value = VALUES[RANKS.index(rank)] def get_str(self): print("{} of {}".format(self.rank, self.suit))