text: # game.py
  
  import random
  
  SUITS = "♠ ♡ ♢ ♣".split()
  RANKS = "2 3 4 5 6 7 8 9 10 J Q K A".split()
  
  
  def create_deck(shuffle=False):
      """Create a new deck of 52 cards"""
      deck = [(s, r) for r in RANKS for s in SUITS]
      if shuffle:
          random.shuffle(deck)
      return deck
  
  
  def deal_hands(deck):
      """Deal the cards in the deck into four hands"""
      return (deck[0::4], deck[1::4], deck[2::4], deck[3::4])
  
  
  def play():
      """Play a 4-player card game"""
      deck = create_deck(shuffle=True)
      names = "P1 P2 P3 P4".split()
      hands = {n: h for n, h in zip(names, deal_hands(deck))}
  
      for name, cards in hands.items():
          card_str = " ".join(f"{s}{r}" for (s, r) in cards)
          print(f"{name}: {card_str}")
  
  
  if __name__ == "__main__":
      play()
  