Код: Выделить всё
global running
running = False
print(running)
def command(text):
print(running)
if ("jarvis" in text) or (running == True):
running = True
if "time" in text:
t = time.localtime()
current_time = time.strftime("%H %M", t)
say("Time now is"+current_time)
elif "open youtube" in text:
say("Opening youtube")
webbrowser.open("https://www.youtube.com/")
elif "shut up" in text:
running = False
else:
pass
print(running)
else:
pass
примечание: я пробовал с и без скобки, не помогло
буду благодарен за любую помощь
Подробнее здесь: https://stackoverflow.com/questions/790 ... -statement