python雙層循環,跳出內部循環結束最外循環

def main(): door_status = [4,5,5,4,5,5,5,4] lock_signal = 5 open_door = False for k in range(1,3): for x in range(5): door = door_status[k] if door == lock_signal: open_door = True
相關文章
相關標籤/搜索