You shouldn't need to list ALL the zip codes, it is a system. There is more rule than exception.
What do the digits indicate?
The first number indicates a ZIP code zone. Here’s a look at the 9 zones:
States in ZIP code zone
0 Connecticut, Massachusetts, Maine, New Hampshire, New Jersey, Puerto Rico, Rhode Island, Vermont, Virgin Islands
1 Delaware, New York, Pennsylvania
2 District of Columbia, Maryland, North Carolina, South Carolina, Virginia, West Virginia
3 Alabama, Florida, Georgia, Mississippi, Tennessee
4 Indiana, Kentucky, Michigan, Ohio
5 Iowa, Minnesota, Montana, North Dakota, South Dakota, Wisconsin
6 Illinois, Kansas, Missouri, Nebraska
7 Arkansas, Louisiana, Oklahoma, Texas
8 Arizona, Colorado, Idaho, New Mexico, Nevada, Utah, Wyoming
9 Alaska, American Samoa, California, Guam, Hawaii, Marshall Islands, Federated States of Micronesia, Northern Mariana Islands, Oregon, Palau, Washington
The first three digits of the ZIP code indicate the sectional center facility (SCF) or a central mail processing facility that serves one or more three-digit ZIP codes. There are sectional center facilities all over the United States.
For example, if a ZIP code starts with a 7, you know it’s going to one of four states: Louisiana, Arkansas, Oklahoma, or Texas. Then, the second two numbers will tell you what state. If it’s between 716 and 729, then you know it’s going to be in Arkansas. So 716 would be connected with Pine Bluff, AR.
The last two digits in a ZIP code are how the mail is actually sorted to specific postal offices. The “plus-four” add-on codes that were launched in 1983 are supposed to identify a specific geographic location within the five-digit area. Although the full nine-digit ZIP codes are not required in order to send mail, they are increasing in everyday use.
The Bottom Line
The ZIP code is not just a randomly generated number. There is meaning and organization behind it, which is why it’s a system that’s lasted more than 50 years.
Good Little Programmers always look for patterns in the data.