Created
August 14, 2012 18:28
-
-
Save rickysaltzer/3351508 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment