def deal_card():
cards = [11, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10]
card = random.choice(cards)
return card
user_cards = []
computer_cards = []
for _ in range(2):
user_cards.append(deal_card())
computer_cards.append(deal_card())
draw_another_card = input("Type 'y' to get another card, type 'n' to pass : ")
if draw_another_card == "y":
new_user_cards = user_cards.append(deal_card())
new_computer_cards = computer_cards.append(deal_card())
print(new_user_cards)
when I print new_user_cards, it shows none. I don't understand why, I googled a lot but couldn't get any answers.
The random function is from replit.
I would really like to what is going wrong in the above code!