Commit ec36f79c by gijs

spaces

parent 852503a4
......@@ -28,27 +28,25 @@ pattern = re.compile("[a-zA-Z]*")
# read line per line
with open(path, 'r', 1) as source:
for line in source:
# find the word
cuts = re.findall(pattern, line)
# if there is a word
if cuts[0]:
# isolate word
key = cuts[0]
# calculate lenght of the word
cut = len(key)
# split line in a list of word & numbers
value = line[cut:]
print("\t\t\t\t\t\t\t\t\t", green(key), "\n")
# print numbers
print(value, "\n")
# allow 1 second pause for legibility
time.sleep(1)
os.system('cls' if os.name == 'nt' else 'clear')
print("\n")
source.close()
for line in source:
# find the word
cuts = re.findall(pattern, line)
# if there is a word
if cuts[0]:
# isolate word
key = cuts[0]
# calculate lenght of the word
cut = len(key)
# split line in a list of word & numbers
value = line[cut:]
print("\t\t\t\t\t\t\t\t\t", green(key), "\n")
# print numbers
print(value, "\n")
# allow 1 second pause for legibility
time.sleep(1)
os.system('cls' if os.name == 'nt' else 'clear')
print("\n")
source.close()
# 66 woorden per seconde als we in 8u zouden tonen
# alfabetisch rangeschikken in tweede script
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment