recherche

Maison  >  Questions et réponses  >  le corps du texte

python - tuple元组输出

PHPzPHPz2894 Il y a quelques jours344

répondre à tous(2)je répondrai

  • 天蓬老师

    天蓬老师2017-04-18 09:32:53

    1

    2

    <code>for (string,) in data:

        print(string)</code>

    ou :

    1

    2

    <code>for string in data:

        print(string[0])</code>

    répondre
    0
  • PHP中文网

    PHP中文网2017-04-18 09:32:53

    1

    2

    <code class="python">for phone_number in data:

        print phone_number[0]</code>

    répondre
    0
  • Annulerrépondre