Код: Выделить всё
def qr():
x = random.randint(1, 21)
canvas.create_rectangle(x * 10, x * 10, x + 10, x + 10, fill = 'black')

Так что спасибо за каждый ответ и хорошего дня.
Подробнее здесь: https://stackoverflow.com/questions/709 ... -in-python
Код: Выделить всё
def qr():
x = random.randint(1, 21)
canvas.create_rectangle(x * 10, x * 10, x + 10, x + 10, fill = 'black')
