Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to save all countries from a list in a database python

>>> from iso3166 import countries
>>> for c in countries:
>>>       print c
Country(name=u'Afghanistan', alpha2='AF', alpha3='AFG', numeric='004')
Country(name=u'xc5land Islands', alpha2='AX', alpha3='ALA', numeric='248')
Country(name=u'Albania', alpha2='AL', alpha3='ALB', numeric='008')
Country(name=u'Algeria', alpha2='DZ', alpha3='DZA', numeric='012')
...
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #save #countries #list #database #python
ADD COMMENT
Topic
Name
3+6 =