Very early stages of learning Python, and trying to complete 100 days of code challenge. Am building a crude blackjack game, but am stuck on what I am sure is probably a very simple fix that I don't recognise!
This is my code so far:
import random
cards = [11, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10]
players = ["player", "dealer"]
players_hands = {}
players_scores = {}
for player in players:
cards = random.choices(cards, k = 2)
players_hands[player] = cards
players_scores[player] = sum(cards)
print(players_hands["player"])
print(players_scores["player"])
print(f"Your cards: {players_hands["player"]}, current score: {players_scores["player"]}")
print(f"Dealer's first card: {players_hands["dealer"][0]}")**
I want to print the f-string version rather than the basic print statement, but keep getting a syntax error and don't know what I've done wrong.