Thanks for sharing what you found there. Yes, you have to be really careful when you switch from the “Sequential API” where the commas are required, to the “Functional API” where they can have very nasty side effects!
They don’t give us that much instruction on these APIs in the course material. It’s worth having a look at this thread from ai_curious which gives a more detailed explanation of how to use these constructs.