import tkinter as tk
import threading
import time
import random
def tanchuang():
root=tk.Tk()
width = root.winfo_screenmmwidth()
height = root.winfo_screenheight()
x=random.randint(-960,960)
y=random.randint(-540,540)
root.title("恶作剧")
root.geometry(f"400x100+{x}+{y}")
tk.Label(root,
text='菜就多练!',
bg='yellow',
font=('楷体',17),
width=40,height=4
).pack()
root.mainloop()
while 1:
t = threading.Thread(target=tanchuang)
time.sleep(0.0000000000000000000000000000000000000000000001)
t.start()