wrote a blackjack game in python , would like you get notes on it
Naming things

Try to give proper names to things, such that they follow the usual conventions, are concise, unambiguous and to the point. There are a few things I would change:


Rename cards to deck, to signify that it isn't just a random bunch of cards, but the actual deck you are drawing from.
The function hand() is quite misnamed, it's not about managing just one hand of cards, but rather it implements the whole game. So perhaps play_blackjack() would be better?
The function convert() has a very generic name, that doesn't tell anything about what it is converting from or to. It would be better named convert_card_to_value().


In general, variables describe things, so their names should usually be a noun, whereas functions describe actions, so they should be verbs.

Try to reorganize the code into classes

Classes make it easier to organize your code. I can think of at least three classes that you should make: Card, Deck and Hand.

A Card is quite simple, it just is the color and number of the card, and has a member function to convert it to a value.

A Deck is a collection of cards, with member functions like shuffle(), draw() and so on.

A Hand is also a collection of cards, but has member functions add() and get_value(). The latter is important: you can't just add values of cards together to get the total value of a hand. Think about drawing an ace, 9, king in that order. Your current code converts card values the moment they are drawn, and only checks aces against the total so far. So your method would count this as 11 + 9 + 10 = 30, whereas the correct value is 1 + 9 + 10 = 20.

Avoid infinite recursion

Your code recursively calls itself indefinitely. While this might seem harmless at first, the problem is that you are using more and more stack space, until after enough games played you get a stack overflow. The proper way to deal with this is to structure some parts of your code as loops. For example, you want to have a function to play one game of blackjack, and that function should be called in a loop like so:

def another_game():
     while True:
          answer = input('Would you like to play again?').lower()
          if answer == 'yes':
              return True
          elif answer == 'no':
              return False
          else
              print('Please enter yes or no.')

...

print('Hello!')

while True:
    play_game();
    if not another_game():
        break

print('Goodbye!')
```