Skip to content

Instantly share code, notes, and snippets.

@norcal82
Created August 19, 2014 21:45
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save norcal82/e4c7e8113f377db184bb to your computer and use it in GitHub Desktop.
Save norcal82/e4c7e8113f377db184bb to your computer and use it in GitHub Desktop.
python array of US state names
state_names = ["Alaska", "Alabama", "Arkansas", "American Samoa", "Arizona", "California", "Colorado", "Connecticut", "District ", "of Columbia", "Delaware", "Florida", "Georgia", "Guam", "Hawaii", "Iowa", "Idaho", "Illinois", "Indiana", "Kansas", "Kentucky", "Louisiana", "Massachusetts", "Maryland", "Maine", "Michigan", "Minnesota", "Missouri", "Mississippi", "Montana", "North Carolina", "North Dakota", "Nebraska", "New Hampshire", "New Jersey", "New Mexico", "Nevada", "New York", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Puerto Rico", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Virginia", "Virgin Islands", "Vermont", "Washington", "Wisconsin", "West Virginia", "Wyoming"]
@Enan456
Copy link

Enan456 commented Jun 19, 2020

Saved me a bunch of time, thanks!

@GKjohns
Copy link

GKjohns commented Oct 23, 2020

This snippet is a life saver, saved me hours of time 🙏🏽

@jguzman-tech
Copy link

You have territories in there and it looks like you mistakenly put "District " and "of Columbia" as separate elements.

@jinfei1125
Copy link

Thank you!!

@zanjani99
Copy link

thank you

@MayCXC
Copy link

MayCXC commented Jul 29, 2021

beware "District " and "of Columbia" at [8] and [9]

@michaelbrant
Copy link

Here's the proper list of the 50 US States..

state_names=["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"]

@josh-mith
Copy link

Big up, thanks for saving me some time!

@RuizDuarteRoberto
Copy link

As far as I know, there are 50 states in the USA, you wrote down territories too.

@FrostyAvarice
Copy link

Had the territories in there, but still saved me time. Thank you!

@shamusc
Copy link

shamusc commented Feb 9, 2023

Big time saver. Thank you!

@fortenforge
Copy link

bro had one job and messed it up... incredible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment