It looks like you are using the Keras Sequential API in the code you showed at the beginning of this thread. In that case, you are making a list of “instantiated functions”, but not actually “invoking” them with inputs and outputs. So in that case, because you are creating a list, you need commas between each instantiated function line to turn it into a list.
Note that in the second major portion of this assignment, you will be using the Functional API, which is a different syntax. In that case you are actually explicitly invoking the instantiated functions with inputs and returning explicit outputs. So in that case, you will not want the commas between the lines.
Here’s a thread that gives a much more thorough explanation of how the Sequential and Functional APIs work than we get in the assignments.