import tkinter as tk import random import threading import time def boom(): window = tk.Tk() width = window.winfo_screenwidth() height = window.winfo_screenheight() a = random.randrange(0, width) b = random.randrange(0, height) window.title('就是玩') window.geometry("300x100" + "+" + str(a) + "+" + str(b)) tk.Label(window, text='你傻逼,你是大傻逼', bg='blue', font=('宋体', 17), width=30, height=4).pack() window.mainloop() threads = [] for i in range(999): t = threading.Thread(target=boom) threads.append(t) time.sleep(0.001) threads[i].start()
10-31
1330
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-12
3825
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)