#I Forgot Colons! for i in range(0, 3): if a[i] > 180 or a[i] < 0: exit else: a[i] #So Embarrassed!