import sys
test_cases = open(sys.argv[1], 'r')
for test in test_cases:
rows=test.split(',')
min=10
for row in rows:
counter=0
for c in row:
if c == 'Y':
break
if c == '.':
counter += 1
if counter < min:
min = counter
if min == 0 :
break
if min == 0 :
break
print min
test_cases.close()
test_cases = open(sys.argv[1], 'r')
for test in test_cases:
rows=test.split(',')
min=10
for row in rows:
counter=0
for c in row:
if c == 'Y':
break
if c == '.':
counter += 1
if counter < min:
min = counter
if min == 0 :
break
if min == 0 :
break
print min
test_cases.close()
No comments:
Post a Comment