Here's a breakdown:
1. "Or" connecting two items in a list:
* No commas before or after "or" if the list has three or more items.
Example: "I need to buy apples, bananas, or pears."
* Commas before and after "or" if the list has only two items.
Example: "I need to buy apples, or I can get bananas."
2. "Or" connecting two clauses (independent sentences):
* Commas before and after "or" if the clauses are independent and could stand alone as sentences.
Example: "I can go to the park, or I can stay home and read."
* No commas before or after "or" if the clauses are dependent (one relies on the other).
Example: "I will eat my lunch now, or I will be late to work."
3. "Or" used in other contexts:
* No commas before or after "or" in most other situations.
Example: "Please tell me your name, or I cannot help you."
Example:
"I need to buy apples, bananas, or pears. I can go to the grocery store, or I can order them online. But, I need to make a decision, or I won't have any fruit!"
Remember: The best way to determine whether a comma is needed before or after "or" is to carefully consider the sentence structure and whether "or" is connecting two independent clauses.