Do both the following sentences mean the same?
1- Some people don't have any option except to use public transportation.
2- Some people don't have an option except to use public transportation.
Do both the following sentences mean the same?
1- Some people don't have any option except to use public transportation.
2- Some people don't have an option except to use public transportation.
Both are fine. Here "an" may or may not convey the idea of "any":
"any" here means that there aren't one or more possible options while "an" means that there isn't a single possible option.
Meanwhile in the affirmative sentence the meaning will be different.
This question “Is there a” vs “is there any” and J.R. answer might help you.