random.shuffle, then uses two more functions of random.
import random
letters = list("abcde")
random.shuffle(letters)
print(sorted(letters) == list("abcde"), len(set(random.sample(letters, 5))), random.randint(3, 3))
What does the program print, every time it runs?Log in to join the discussion.
Loading…