While practicing writing a function that takes 2 lists as input:
def midpt_generator([x1, y1], [x2, y2]):
midpt = [(x1 + x2)/2 , (y1 + y2)/2)]
return midpt
This should find the midpoint of a coordinate pair. Input is the two coordinate points (entered as lists) , function should perform operation on the values from the lists, and return the midpoint (a new list, coordinate pair). What is the syntax error here?