0

I am trying to get a random pair of colors from a Python list. Here is my code so far:

from random import *

color_choices = ['#FAACA8', '#DDD6F3', '#21D4FD', '#B721FF', '#08AEEA', '#2AF598', '#FEE140', '#FA709A', '#8EC5FC', '#E0C3FC', '#FBAB7E', '#F7CE68', '#D9AFD9', '#97D9E1', '#FBDA61', '#FF5ACD', '#F76B1C']
shuffle(color_choices)
print(color_choices)

The problem is the it keeps returning the same "random" order on each run of the program

['#21D4FD', '#FBDA61', '#B721FF', '#F76B1C', '#FBAB7E', '#DDD6F3', '#E0C3FC', '#2AF598', '#F7CE68', '#FF5ACD', '#FEE140', '#FA709A', '#8EC5FC', '#08AEEA', '#FAACA8', '#97D9E1', '#D9AFD9']

I ran the program three times. It cannot be a coincidence that the shuffle will return all colors in the exact same order three times.

What am I missing?

Thanks.

Real Noob
  • 1,369
  • 2
  • 15
  • 29

0 Answers0