I am struggling with getting the right output for my code. The code keeps giving me the wrong state as my output, what am I doing wrong?
def whatState(cityName):
if cityName == "dallas" or "austin" or "houston" or "ft worth" or "el paso":
stateName = "Texas"
elif cityName == "sacramento" or "san francisco" or "los angeles" or "san diego":
stateName = "California"
elif cityName == "miami" or "west palm beach" or "orlando" or "key west" or "tallahassee":
stateName = "Florida"
elif cityName == "chicago" or "naperville" or "peoria" or "evanston" or "rockford":
stateName = "Illinois"
return stateName
When I try testing my code with chicago I'm getting Texas as my output, when I should be getting Illinois
Thank you in advance!