0

I am writing a code for school and we need to make a deck of cards as part of it. I have already made the deck but I do not know how to print it the way I want it. It either prints with all the brackets and commas or none. My goal is to print it with a comma separating every two values of the list. Any suggestions?

1 Answers1

0

Here's way, maybe not the best result:

cards = ['3','A','7','Q','4']
print(f'"{", ".join(cards)}"')

Output:

"3, A, 7, Q, 4"
Red
  • 26,798
  • 7
  • 36
  • 58