class new_figure:
W = ('#c46210', '#648c11', '#e97451', '#af002a', '#008000', '#5f9ebb', '#867e36', '#5d8aa8', '#ef9999', '#d755b1', '#8a2be2', '#556b2f', '#df00ff')
S = random.choice(W)
block = canvas2.create_rectangle(60, 0, 90, 30, fill = S)
def newcolor():
T = random.choice(new_figure.W)
return T
def newblock():
new_figure.block = canvas2.create_rectangle(60, 0, 90, 30, fill = new_figure.newcolor())
class old_figure:
...
...
self.id = self.canvas1.create_rectangle(int(pos1[0]) + 90, int(pos1[1]), int(pos1[2]) + 90, int(pos1[3]), fill = new_figure.newcolor())
new_figure.newblock()
как сделать, чтобы параметр Т был одинаковым?