for job in jobs:
if int(dpr) <= int(user.dpr):
if str(user.gender) == 'male:
if str(orpi) == 'yes':
if int(profil) >= int(user.profil):
bot.send_message(message.chat.id, str(name)
**now i want to exit the "if's" and go to next "job in for loop**
else:
if int(profil) <= int(user.profil):
bot.send_message(message.chat.id, str(name)
**now i want to exit the "if's" and go to next "job in for loop**
else:
if str(orpi) == 'yes':
if int(profil_fem) >= int(user.profil):
bot.send_message(message.chat.id, str(name)
**now i want to exit the "if's" and go to next "job in for loop**
else:
if int(profil_fem) >= int(user.profil):
bot.send_message(message.chat.id, str(name)
**now i want to exit the "if's" and go to next "job in for loop**
您好,我想使“現在我想退出“if”并轉到代碼中的下一個“for回圈中的作業”,回傳到for回圈(作業中的作業),并處理下一個作業。是有什么命令嗎?
uj5u.com熱心網友回復:
您可以使用 continue 關鍵字。它允許您忽略接下來的所有內容并轉到回圈的開頭。例如在這種情況下:
for i in (0, 1, 2):
print(i)
continue
print("This won't get executed")
continue 之后的行將永遠不會運行。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/374246.html
