Hi everyone, I'm new to python but trying to assign 5 cards to 2 players using lists.. I have created the below code so far but I can't figure out why it's not working:
# #Create a deck of cards
faces = ["2 ", "3 ", "4 ", "5 ", "6 ", "7 ", "8 ", "9 ", "10 ", "J ", "Q ", "K ", "A "]
suits = ["spades", "clubs", "hearts", "diamonds"]
cards = []
#loop through faces
cards = [f + s for f in faces for s in suits]
#loop through suits
cards[:4], cards[-4:]
#shuffle the cards
import random
random.shuffle
hand_1 = []
hand_2 = []
while len (hand_1) < 5:
while len (hand_2) < 5:
#print outcome
print(*cards, sep="\n")
[edit by admin: formatting]