Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Remove what's not needed solution in Clear category for Ground for the House by Tinus_Trotyl
def house(plan):
plan = [line for line in plan.split()]
for n in True, False:
while plan and '#' not in plan[0]: plan = plan[1:]
while plan and '#' not in plan[~0]: plan = plan[:-1]
if n: plan = [''.join([line[i] for line in plan]) for i in range(len(plan[0]))] if plan else []
return len(plan) * len(plan[0]) if plan else 0
Sept. 5, 2018
Comments: