Форум сайта python.su
Добрый день. Имеется функция:
def check_connection(network, first, second): for thing in network: if first in thing: things = thing.replace('-', ' ').split() for xy in things: if first != xy: first = xy if first == second: return True sys.exit() else: check_connection(network, first, second) return False
check_connection( ("dr101-mr99", "mr99-out00", "dr101-out00", "scout1-scout2", "scout3-scout1", "scout1-scout4", "scout4-sscout", "sscout-super"), "scout2", "scout3")
Отредактировано FishHook (Июнь 1, 2016 17:12:12)
Офлайн
NiccolumЧто такое закрыть функции? Никогда не слышал чтобы их можно было закрыть.
реально ли закрыть все функции
Niccolumsys.exit() бесполезен. Он недостижим.if first == second: return True sys.exit()
Офлайн