-2
我是Python新手,所以我正在嘗試編寫一個簡單的電子郵件爆炸應用程序。當我編譯時,我收到了「第4行無效的語法錯誤」消息。在變量和if/elif/else Python中遇到問題2.7.8
這裏是我的代碼:
import easygui as gui
import smtplib
choice = gui.buttonbox(msg = 'Who is your email provider?', title = 'Mailblaster', choices = ("Gmail", "Yahoo", "AOL", "iCloud","Hotmail/Outlook.com",)
if choice == 'Gmail'
smtpserver = smtplib.SMTP("imap.gmail.com",587)
elif choice =='Yahoo'
smtpserver = smtplib.SMTP("imap.mail.yahoo.com",465)
elif choice == 'AOL'
smtpserver = smtplib.SMTP("imap.aol.com",587)
不,這不是它。我試過並得到了同樣的錯誤。 – user3649933 2014-10-27 19:17:15
@ user3649933您還錯過了第3行的右括號 – 2014-10-27 19:26:29