簡體   English   中英

Def main():給我錯誤

[英]Def main(): Giving me errors

def Main()
    import pyautogui, time
    import uuid
    import random
    import string
    import os
    from timeit import default_timer as timer
    start = timer()
    clear = lambda: os.system('cls')
    i = 0
    a = ''
    while i < 15:
        a += random.choice(string.ascii_letters)
        i += 1
    print(email.lower())
    ...

Main()

我想定義Main ,然后在我的源代碼末尾返回 main。 我已經嘗試了如上所示的解決方案,但出現語法錯誤。 我對 Python 相當陌生。

你有語法錯誤。 試試下面的代碼。

import pyautogui, time
import uuid
import random
import string
import os
from timeit import default_timer as timer
email = 'some_email@some.com'
def Main():
    start = timer()
    clear = lambda: os.system('cls')
    i = 0
    a = ''
    while i < 15:
        a += random.choice(string.ascii_letters)
        i += 1
    print(email.lower())
Main()

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM