Lesson 11: Lists - Raffle

posted Jan 23, 2019, 8:02 AM by Attila Lengyel
names = ["Tanisha", "Sahana", "Nadezda","Claire", "Zubin", "Cayne", "Boston","Ameya", "Aryan"]

print(names)

num = len(names)
print(num)

import random

winner = random.randint(0,num - 1)

print(winner)
print(names[winner])

print(sorted(names))
print(sorted(names, reverse = True))

Comments