๐ โฏ๏ธTeresita๐ง๐ญ on Nostr: Shuffle and deal four hands of five cards with #Python #HK #!/usr/bin/python3 # -*- ...
Shuffle and deal four hands of five cards with #Python #HK
#!/usr/bin/python3
# -*- coding: utf-8 -*-
deck=['๐ก', '๐ข', '๐ฃ', '๐ค', '๐ฅ', '๐ฆ', '๐ง', '๐จ', '๐ฉ', '๐ช', '๐ซ', '๐ญ', '๐ฎ', '๐ฑ', '๐ฒ', '๐ณ', '๐ด', '๐ต', '๐ถ', '๐ท', '๐ธ', '๐น', '๐บ', '๐ป', '๐ฝ', '๐พ', '๐', '๐', '๐', '๐', '๐ ', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐']
import random
random.shuffle(deck)
deal=''.join(deck)
print (" ".join(deal[1:6]))
print (" ".join(deal[6:11]))
print (" ".join(deal[11:16]))
print (" ".join(deal[16:21]))
#!/usr/bin/python3
# -*- coding: utf-8 -*-
deck=['๐ก', '๐ข', '๐ฃ', '๐ค', '๐ฅ', '๐ฆ', '๐ง', '๐จ', '๐ฉ', '๐ช', '๐ซ', '๐ญ', '๐ฎ', '๐ฑ', '๐ฒ', '๐ณ', '๐ด', '๐ต', '๐ถ', '๐ท', '๐ธ', '๐น', '๐บ', '๐ป', '๐ฝ', '๐พ', '๐', '๐', '๐', '๐', '๐ ', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐']
import random
random.shuffle(deck)
deal=''.join(deck)
print (" ".join(deal[1:6]))
print (" ".join(deal[6:11]))
print (" ".join(deal[11:16]))
print (" ".join(deal[16:21]))