'hm'
This commit is contained in:
parent
c394833efe
commit
82cd75137a
10
TaskB01/run
10
TaskB01/run
@ -60,9 +60,13 @@ class automata:
|
||||
if self.graph[q]:
|
||||
# search through all its connections to find value
|
||||
for transition in self.graph[q]:
|
||||
if transition[i]:
|
||||
# append next node
|
||||
result.append(transition[i])
|
||||
try:
|
||||
if transition[i]:
|
||||
# append next node
|
||||
result.append(transition[i])
|
||||
except KeyError:
|
||||
# there is no value like that (element from the outside of alphabet)
|
||||
return []
|
||||
# return list of next nodes
|
||||
return result
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user