可以使用 tkinter 模块中的 mainloop() 方法来实现在 tkinter 中的无限循环。 示例代码如下: import tkinter as tk root = tk.Tk() root.mainloop()