Simulated bucket landlord licensing, a total of 54 cards,
Color: Spades (' \u2660 '), plum (' \u2663 '), Box (' \u2665 '), Red Peach (' \u2666 '), type: A2-10jqk, king Size (x, x) three persons, each 17 card, three card bottom left
Enter a carriage return and print 17 cards for the first question
Enter a carriage return and print the 17 cards for the second question.
Enter a carriage return, print the third question 17 card
Import Random as R
"" "to achieve a random 17 card" "" "Def Reduce (L, W): For x in W:l.pop (L.index (x)) return L = [' A ', ' 2 ', ' 3 ', ' 4 ', ' 5 ' , ' 6 ', ' 7 ', ' 8 ', ' 9 ', ' Ten ', ' J ', ' Q ', ' K '] H = [' \u2660 ', ' \u2663 ', ' \u2665 ', ' \u2666 '] P = [' x ', ' X '] for x in H:for Y in l:s = x + y P.append (s) r.shuffle (p) i = 0 L2 = [] While I < 2:if len (p) > 17:w = R.sample (P, 17) # Select n Random and distinct elements from the sequence L2.append (w) P = Reduce (p, W) print (W) input () E Lse:break Print (P)
Import random as R "" "The
Simple implementation of the code above" ""
L = [' A ', ' 2 ', ' 3 ', ' 4 ', ' 5 ', ' 6 ', ' 7 ', ' 8 ', ' 9 ', ' Ten ', ' J ', ' Q ', ' K ']
L1 = [' x ', ' X ']
L1.extend (Map (lambda x:x+ "\u2660", L))
l1.extend (map (lambda x:x+ "\u2663", L))
l1.extend (map (lambda x:x+ \ u2665 ", L))
l1.extend (map (lambda x:x+" \u2666 ", L))
r.shuffle (L1)
print (l1[0:17])
input ()
Print (l1[17:34])
input ()
print (l1[34:51])
input ()
print (l1[51:])
Import random as R "" "One card
at a Time" ""
L = [' A ', ' 2 ', ' 3 ', ' 4 ', ' 5 ', ' 6 ', ' 7 ', ' 8 ', ' 9 ', ' Ten ', ' J ', ' Q ', ' K ']
H = [' \u2660 ', ' \u2663 ', ' \u2665 ', ' \u2666 '] w1 = [] W2 = [] W3 = [
]
P = [' x ', ' X '] for
x in h:
for y in L:
s = x + y
p.append (s)
r.shuffle (P)
i = 1 while
i <=:
W1.append (P.pop ())
W2.append (P.pop ())
W3.append (P.pop ())
i + + 1
print (W1)
input ()
Print (W2)
input ()
print (W3)
input ()
print (P)