Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Stone Wall by Unexpected_water_bottle
def stone_wall(wall):
wall = [[square for square in line] for line in wall.split("\n") if line != ""]
weakness = -1
for index in range(len(wall[0])) :
current_column_weakness = sum(1 for line in wall if line[index] == "0")
if current_column_weakness > weakness :
weakness = current_column_weakness
weakest = index
return weakest
Feb. 8, 2019