Form with a country list statically or dynamically generated
This depends on your plans for maintaining the software. If it will not be maintained, it does not matter much. If it will be maintained irregularly and manually, not a big issue unless the country code list is used elsewhere, too, e.g. in a database where you store some submitted information or that contains some data per country. But other things being equal, it is better to generate a large dropdown from a table rather than hard-code it. And if the software will be regularly maintained by checking, among other things, the country list and country names against a reliable source, then a table is surely better. It is easier to generate just a table from the reference data.

Note that reliable and useful data can be difficult to find and the set of countries will change (and is subject to political debate). In your example, the second entry does not refer to a country but to an autonomous area. There are definitions of “country codes” that include many non-country entries for various purposes.