From 1793c0db37d426c6caa752c02e2556acfabdf0e1 Mon Sep 17 00:00:00 2001 From: deadsmond <01.lewicki@gmail.com> Date: Mon, 25 Nov 2019 20:56:05 +0100 Subject: [PATCH] 'hm' --- TaskB01/run | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/TaskB01/run b/TaskB01/run index 2720730..40c3622 100644 --- a/TaskB01/run +++ b/TaskB01/run @@ -6,7 +6,7 @@ import re class automata: # class variables init def __init__(self): - # dictionary of between nodes + # dictionary of connections between nodes self.graph = {} # list of accepting states self.accepting_states = [] @@ -76,9 +76,10 @@ auto = automata() for line in sys.stdin: auto.add_node(line) -print(auto) - f = open(sys.argv[1], 'r') for line in f: - print(auto.test_string(line)) + if auto.test_string(line): + print("TRUE %s" % line) + else: + print("FALSE %s" % line)