首页 > 解决方案 > 我想重复我的代码 x 时间我该怎么办?

问题描述

import time
import ctypes
for count in  (3000):
    def Mbox(title, text, style):
        return ctypes.windll.user32.MessageBoxW(0, text, title, style)
Mbox('Virus detected', 'Would you like to run your anti-viruse software?',6)

标签: python

解决方案


这对你有用。

import time
import ctypes


def Mbox(title, text, style):
    return ctypes.windll.user32.MessageBoxW(0, text, title, style)
for count in range(3000):
    print(Mbox('Virus detected', 'Would you like to run your anti-viruse software?',6))

推荐阅读