Are these 3 sentences that use commas in different ways and why they are needed? I need to go to the supermarket to get cheese, cereal, and fruit. The commas are there to show the items are sperate. My brother went to the park, but I stayed home. The commas are there to make a compound sentence. After eating my lunch, I decided to go for a walk. The comma is used to separate two independent clauses.

Yes, you are correct!

In the sentence "I need to go to the supermarket to get cheese, cereal, and fruit," the commas are used to separate the items in a list, indicating that "cheese," "cereal," and "fruit" are three separate things to be obtained.

In "My brother went to the park, but I stayed home," the comma is used to separate two independent clauses that are joined by a coordinating conjunction ("but"). The comma helps to create a compound sentence.

Lastly, in "After eating my lunch, I decided to go for a walk," the comma is used to separate the dependent clause ("After eating my lunch") from the independent clause ("I decided to go for a walk"). The comma helps to indicate the pause between these two parts of the sentence.