human
I'm having trouble understanding the difference between a comma and semicolon. What are the differences?
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, "I like apples, bananas, and oranges" would use a comma, while "I like apples; I like bananas; I like oranges" would use a semicolon.