from cmath import * def Points_alignes(a,b,c): z=(c-a)/(b-a) if phase(z)==0 or phase(z)==pi: return True else: return False