Due to a huge scandal about the Laddersons Ladder Factory creating faulty ladders, the Occupational Safety and Health Administration require your help in determining whether a ladder is safe enough for use in the work place! It is vital that a ladder passes all criterea:
Given a ladder (drawn as a list of strings) return True if it passes all of OSHA's criterea.
is_ladder_safe([
"# #",
"#####",
"# #",
"# #",
"#####",
"# #",
"# #",
"#####",
"# #"
]) ➞ True
is_ladder_safe([
"# #",
"#####",
"# #",
"#####",
"# #",
"# #",
"#####",
"# #"
]) ➞ False
# Uneven spaces between rungs.
is_ladder_safe([
"# #",
"####",
"# #",
"# #",
"####",
"# #",
"# #",
"####",
"# #"
]) ➞ False
# Ladder is too narrow, should be at least 5 characters wide.
is_ladder_safe([
"# #",
"#####",
"# #",
"# #",
"# #",
"# #",
"#####",
"# #",
"# #",
"# #",
"# #",
"#####",
"# #"
]), ➞ False
# Gap between rungs is too wide, should be less than 3.
is_ladder_safe([
"# #",
"# ##",
"# #",
"# #",
"#####",
"# #",
"# #",
"#####",
"# #"
]) ➞ False
# The top rung is broken.