Last active
June 13, 2024 05:41
-
-
Save jasimmk/44207f6754ebd0bc0057 to your computer and use it in GitHub Desktop.
Countries without Postal Code, ISO Code, Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://en.wikipedia.org/wiki/List_of_postal_codes | |
# http://www.geopostcodes.com/data | |
class NoPostalCodeCountries(object): | |
_countries = { | |
"AO": "Angola", | |
"AG": "Antigua and Barbuda", | |
"AW": "Aruba", | |
"BS": "Bahamas", | |
"BZ": "Belize", | |
"BJ": "Benin", | |
"BM": "Bermuda", | |
"BO": "Bolivia, Plurinational State of", | |
"BQ": "Bonaire, Sint Eustatius and Saba", | |
"BW": "Botswana", | |
"BF": "Burkina Faso", | |
"BI": "Burundi", | |
"CM": "Cameroon", | |
"CF": "Central African Republic", | |
"TD": "Chad", | |
"KM": "Comoros", | |
"CG": "Congo", | |
"CD": "Congo, the Democratic Republic of the", | |
"CK": "Cook Islands", | |
"CI": u"C\xf4te d'Ivoire", | |
"CW": u"Cura\xe7ao", | |
"DJ": "Djibouti", | |
"DM": "Dominica", | |
"GQ": "Equatorial Guinea", | |
"ER": "Eritrea", | |
"FJ": "Fiji", | |
"TF": "French Southern Territories", | |
"GA": "Gabon", | |
"GM": "Gambia", | |
"GH": "Ghana", | |
"GD": "Grenada", | |
"GY": "Guyana", | |
"HM": "Heard Island and McDonald Islands", | |
"HK": "Hong Kong", | |
# "IE": "Ireland", # Ireland came up with Postal code in 13th July 2015(Eircode) but not for whole region? | |
"KI": "Kiribati", | |
"KP": "Korea, Democratic People's Republic of", | |
"LY": "Libya", | |
"MO": "Macao", | |
"MW": "Malawi", | |
"ML": "Mali", | |
"MR": "Mauritania", | |
"NR": "Nauru", | |
"NL": "Netherlands", | |
"AN": "Netherlands Antilles", | |
"NU": "Niue", | |
"QA": "Qatar", | |
"RW": "Rwanda", | |
"KN": "Saint Kitts and Nevis", | |
"ST": "Sao Tome and Principe", | |
"SC": "Seychelles", | |
"SL": "Sierra Leone", | |
"SX": "Sint Maarten (Dutch part)", | |
"SB": "Solomon Islands", | |
"SO": "Somalia", | |
"SR": "Suriname", | |
"SY": "Syria", | |
"TL": "Timor-Leste", | |
"TG": "Togo", | |
"TK": "Tokelau", | |
"TO": "Tonga", | |
"TT": "Trinidad and Tobago", # Planned but not implemented | |
"TV": "Tuvalu", | |
"UG": "Uganda", | |
"AE": "United Arab Emirates", | |
"VU": "Vanuatu", | |
"YE": "Yemen", | |
"ZW": "Zimbabwe" | |
} | |
@classmethod | |
def country_codes(cls): | |
return cls._countries.keys() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Netherlands have postal codes so please remove it from this list.
https://en.wikipedia.org/wiki/Postal_codes_in_the_Netherlands