Answer :
The comma would end up between but and orange.
"You may have an apple or an orange, but you can't have both."
This is because you're coming to a conjunction, which usually has a comma preceding, or coming before, it.
"You may have an apple or an orange, but you can't have both."
This is because you're coming to a conjunction, which usually has a comma preceding, or coming before, it.