human
I'm a bit confused about the difference between a comma and a semicolon. Can you explain the difference to me?
assistant
A comma is used to separate items in a list, while a semicolon is used to separate independent clauses within a sentence. For example, "The cat sat on the mat; it was wet." In this example, the first clause is an independent clause that can stand alone as a complete thought, while the second clause is dependent upon the first one and cannot be understood without it.