playing-cards

check overlap Elements in Playing Cards List

check overlap Elements in Playing Cards List Question: i just ask here for the first time. i made the BlackJack for discord.py but sometimes this was returned me ‘None’ so i tried the debug and found the cause. def deck(self): card_type = ["Club ", "Diamond ", "Spade ", "Heart "] card_nums = ["2", "3", "4", …

Total answers: 1

Sort cards according to their suites and values using python

Sort cards according to their suites and values using python Question: Can anybody help me to sort the cards by suite and value? I have: list_cards = [(‘♥’, ‘9’), (‘♥’, ‘J’), (‘♦’, ‘J’), (‘♥’, ‘7’), (‘♥’, ’10’), (‘♦’, ’10’)] and I need to get: [(‘♥’, ‘7’), (‘♥’, ‘9’), (‘♥’, ’10’),(‘♥’, ‘J’), (‘♦’, ’10’), (‘♦’, ‘J’)] …

Total answers: 2