Midpoint finder function practice STUCK

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?

You are defining the function parameters as [x1,y1] and [x2,y2]. You should be using variable names. Then inside your function, access the array information with those variable names