In Python the comma acts as a tuple creation operator inside parentheses with no other context like function invocation.
Also, last I remember in JS a trailing comma meant the creation of an extra array element that’s null so I became conditioned to only use trailing commas for separators in languages where it’s consistent and specified very explicitly like in HCL