title: For loop not loading all images in pygame and can't blit them onto screen
body: <p>I'm trying to make a blackjack game and I'm having trouble loading the images for the cards in the for loop. The way that I have named the images is like D4.png is the image for the card 4 of Diamonds and QD.png is the image for the Queen of Diamonds etc. My issue is that only the last card types and numbers are being loaded in. When I check the length of the cards_list, it returns only 8 instead of the 53 cards that will be used.</p>
  <pre><code>cards_list = []
  cards_type_1 = ['D', 'H', 'C', 'S']
  cards_type_2 = ['Q', 'K', 'A', 'J']
  
  for card in cards_type_1:
      for x in range(2, 11):
          img = pygame.image.load(f'img\cards\{card}{x}.png')
          cards_list.append(img)
  
  for card in cards_type_2:
      for suit in cards_tpye_1:
          img = pygame.image.load(f'img\cards\{card}{suit}.png')
      cards_list.append(img)
  
  print(len(cards_list)) # This returns only 8
  </code></pre>
  <p>Additionally, for the cards that I have loaded, I wish for the computer to deal out these cards at random. I'm using a button module I found online to detect when a button has been clicked. So what I'm trying to do is allow the player to click on the Hit button and be given a card. However, the card only appears on screen for half a second, then disappears.</p>
  <pre><code>while run:
      clock.tick(60)
      screen.blit(bg, (0, 0))
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
              run = False
  
      # this is code for the main menu
      if start_game is False:
          if display_main_menu:
              if exit_btn_1.draw(screen):
                  run = False
              if start_btn.draw(screen):
                  start_game = True
                  # tkinter mainloop
                  prompt.grid(row=0, column=0, columnspan=3)
                  root.title('Enter Name')
                  e.grid(row=1, column=0, columnspan=3)
                  add_btn.grid(row=2, column=1)
                  root.mainloop()
  
              if leaders_btn.draw(screen):
                  pass
          
      if start_game is True:
          display_main_menu = False
          if exit_btn_2.draw(screen):
              run = False
          if menu_btn_2.draw(screen):
              start_game = False
              display_main_menu = True
          if hit_btn.draw(screen): # this means if the bit button is clicked
              screen.blit(random.choice(cards_list), (400, 400))
          
          screen.blit(coin_img, (960, 40))
  
          # draw text method created just to draw text on image
          draw_text(f'Name: {name}', font1, 50, 50, BLACK)
          draw_text(f'Score: {score}', font1, 50, 100, BLACK)
          draw_text(f'{player.credits}', font2, 1050, 50, GOLD)
  
      pygame.display.update()
  </code></pre>