renamed 2 digit file names

This commit is contained in:
Tristan 2018-12-10 23:56:11 +00:00
parent 018011dd27
commit b4d985a55a
44 changed files with 0 additions and 0 deletions

16
2015/01/part2.py Normal file
View file

@ -0,0 +1,16 @@
with open('input.txt', 'r') as input:
pos = 0
char_pos = 0
text = input.readline()
for char in text :
if char == ')':
pos -= 1
elif char == '(':
pos += 1
char_pos += 1
if pos == -1:
print (char_pos)
break
input.close()