Lucas Meier Lucas Meier - 4 months ago 7
Python Question

How to use method?

I have a problem using the

Here is the code.

import time

Answer

Don't use time.sleep() at all in Tkinter applications. Have the callback schedule a call to itself with after().

def command_Print(counter=0):
    Labelvar.set(counter)
    if counter < 10:
        root.after(1000, lambda: command_Print(counter+1))

Also, range(0, 10, 1) is just range(10). There's no need to repeat the defaults.