Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- # Test names
- contestants = ["Jack The Ripper", "Jesse James", "Ebola Chan", "Dennis Ritchie", "Gladstone Wellington", "Bo Madsen", "Novak Djokovic"]
- ary_keys = []
- rand_selected_keys = []
- single_ary_pos = 0
- def results(x):
- print "Congratulations ***%s*** You just won an invite" % (contestants[x])
- print "\n"
- for i,a in enumerate(contestants):
- ary_keys.append(i);
- rand_selected_keys = random.sample(ary_keys, 3)
- print "AND THE WINNERS ARE:\n"
- for i in rand_selected_keys:
- single_ary_pos = i
- results(single_ary_pos)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement