import statistics import sys # Basic color codes RED = '\033[91m' GREEN = '\033[92m' BLUE = '\033[94m' RESET = '\033[0m' # This resets the color back to default with open(sys.argv[1]) as file: lines = [line.rstrip() for line in file] max_x = 0 for line in lines: x = line.split(' ')[0] y = line.split(' ')[1] if x == '#': continue x = int(x) y = int(y) if y > 0: max_x = x if max_x > 900: print(f"{RED}WARNING{RESET}",max_x) else: print(max_x)