Aug-18-2017, 09:11 PM
(This post was last modified: Aug-18-2017, 09:11 PM by SummoningZ.)
Thank you nilamo.
Ok so now I have this import itertools
Ok so now I have this import itertools
import itertools import random suits = "DCHS" numbers = list(map(str, range(2, 11))) + list("JQKA") full_deck = ["".join(pair) for pair in itertools.product(numbers, suits)] random.shuffle(full_deck) pack = full_deck[:21] first = pack[0:7] second = pack[7:14] third = pack[14:21] print("1: " + " ".join(first)) print("2: " + " ".join(second)) print("3: " + " ".join(third)) selection = int(input("> ")) if selection == 1: pack.extend(second) pack.extend(first) pack.extend(third) elif selection == 2: pack.extend(first) pack.extend(second) pack.extend(third) elif selection == 3: pack.extend(first) pack.extend(third) pack.extend(second) print("You're thinking of %s" %pack[10])How do I do the actual trick by choosing the 11th card?