How to display random numbers in canvas that the number changes constantly.
from tkinter import *
from random import randrange
from tkinter.font import *
root=Tk()
root.geometry("600x300")
while True:
var=randrange(0,10)
var+=60
cv = Canvas(root,width=200,height=200,bg="blue")
styles = Font(family="calibri",size=30,weight="bold")
cv.create_text(100,100,text="Number: "+str(var),font=styles,fill="lightblue")
cv.pack(side=RIGHT)
root.mainloop()
I want the efect of random nums lile in this code, but in tkinter canvas
from random import randrange
from time import sleep
from os import system
while True:
system("cls")
rand = randrange(10)
rand+=60
print("Random number: ",rand)
sleep(1)