SORU
7 EKİM 2008, Salı


Bulma öğenin dizin listesi Python içeren belirli

Listesi için ["foo", "bar", "baz"] liste "bar" Python Dizini (1) en temiz yolu nedir? Bir madde

CEVAP
7 EKİM 2008, Salı


>>> ["foo", "bar", "baz"].index('bar')
1

Referans: Data Structures > More on Lists

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Andytokkallos

    Andytokkallo

    27 Kasım 2007
  • ElChakotay Andrich

    ElChakotay A

    10 EKİM 2013
  • FASHTAG

    FASHTAG

    5 EYLÜL 2012