0

"Break" problem

def get_input(): command = input(":").split() verb_word = command[0] if verb_word in verb_dict: verb = verb_dict[verb_word] elif input(":").split() == "Выйти": break else: print("Неизвестный глагол {}".format(verb_word)) return if len(command) >= 2: noun_word = command[1] print(verb(noun_word)) else: print(verb())

20th Dec 2016, 7:49 PM
Ulan Ortangalyiev
Ulan Ortangalyiev - avatar
2 Antworten
+ 5
only while, for... (not if)
20th Dec 2016, 8:09 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
What is this supposed to do? Break is used to break out of loops not conditionals
20th Dec 2016, 8:06 PM
Rishi Anand
Rishi Anand - avatar