Random fill colour for shapes in Python(TKinter)
You can use random.choice
like this
import randomcolors = ["red", "orange", "yellow", "green", "blue", "indigo", "violet"]canvas.create_rectangle(self.x, self.y, self.x + 60, self.y + 60, fill = random.choice(colors))
This will pass a random color to fill
whenever this code is executed.