public
Created

  • Download Gist
gistfile1.py
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14
import random
some_cards = ["9 of hearts", "10 of diamonds", "5 of clubs", "king of spades", "king of clubs", "ace of spades"]
some_other_cards = ["9 of hearts", "10 of diamonds", "5 of clubs", "king of spades", "king of clubs", "ace of spades"]
new_cards = []
fancy_cards = []
 
for i in range(0,len(some_cards)-1):
new_cards.append(some_cards.pop(random.randint(0,len(some_cards)-1)))
print("New Cards:")
print(new_cards)
 
new_cards = [some_other_cards.pop(random.randint(0,len(some_other_cards)-1)) for i in range(0,len(some_other_cards)-1)]
print("\nFancy Cards:")
print(new_cards)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.