···1717if __name__ == '__main__':
1818 # Represent traps as True and safe tiles as False.
1919 # The number of safe tiles per row is len(row) - sum(row).
2020- row = [True if c == '^' else False for c in fileinput.input()[0].strip()]
2020+ row = [c == '^' for c in fileinput.input()[0].strip()]
2121 row_len = len(row)
2222 safe_tiles = row_len - sum(row)
2323