[Python] How to convert country names to ISO 3166-1 alpha-2 values, using python

Discussão em 'Python' iniciado por Stack, Março 10, 2025.

  1. Stack

    Stack Membro Participativo

    I have a list of countries like:

    countries=['American Samoa', 'Canada', 'France'...]


    I want to convert them like this:

    countries=['AS', 'CA', 'FR'...]


    Is there any module or any way to convert them?

    Continue reading...

Compartilhe esta Página