Part one of blackjack game
My main tip is to use break and continue to control the flow of your while loops rather than having a bunch of extra bools in the loop condition.  For example, instead of:

  restart = True
  while (bank_balance &gt;= 25 and restart == True):

    print (f"Welcome {player_name}, your bank balance is ${bank_balance} ")
    print (f"Betting $25")
    bank_balance-=25

    deal_hand = play_hand(player_name)

    play=input("Type 'y' to play again, or type any key to quit" + '\n')

    if (play == 'y'):
      restart=True
      print('\n')
    elif (play != 'y'):
      print('Thanks for playing ')
      restart=False


get rid of the restart flag and do:

  while bank_balance &gt;= 25:

    print (f"Welcome {player_name}, your bank balance is ${bank_balance} ")
    print (f"Betting $25")
    bank_balance-=25

    deal_hand = play_hand(player_name)

    play=input("Type 'y' to play again, or type any key to quit" + '\n')

    if (play == 'y'):
      print('\n')
    elif (play != 'y'):
      print('Thanks for playing ')
      break


(Also, for a true/false value instead of saying flag == True or flag == False just say flag or not flag.)

You can apply this same principle to the loops in play_hand where you're checking several bools in each while loop:

  player_bust = False
  dealer_bust = False

  while True:
    hors= input(f"Type 'h' to hit and 's' to stay ")
    if (hors == 'h'):
      new_card= random.randint(1, 11)
      player.append(new_card)
      print(f'{name} pulled a {new_card}')
    elif (hors == 's'):
      print('stay')
      break
    print(f'Dealer total is {sum(dealer)}')
    print(f"{name}'s cards are", *player)
    print(f"{name}'s total is {sum(player)}", '\n')
    if sum(player) &gt; 21:
      player_bust = True
      break

  if not player_bust:
    while sum(dealer) &gt; 17:
      dealer.append(random.randint(1, 11))
      print('The dealers total is', sum(dealer), '\n')
  if sum(dealer) &gt; 21:
    dealer_bust = True

  if player_bust:
    print("You busted!")
  elif dealer_bust:
    print("You win!  The dealer busted!"
  elif sum(dealer) &gt; sum(player):
    print("The dealer wins!")
  elif sum(player) &lt; sum(dealer):
    print("You win!")
  else:
    print('Its a Tie! ')


The idea is to minimize the number of conditions that each check depends on; it gives you less to keep track of as you read your code and try to figure out what it's going to do in any given situation.