human
I'm a bit confused about the difference between a comma and a semicolon. Can you please explain?
assistant
A comma is used to separate independent clauses in a sentence, while a semicolon can be used to join two related independent clauses or phrases together. For example, "The cat sat on the mat; it was wet." In this case, there are two independent clauses joined by a semicolon.