SORU
18 Temmuz 2010, Pazar


Python: okuma diziye satır satır dosya

Nasıl Python dosyasının her satırı okurum ve Dizideki bir öğe olarak her mağazası?

Dosyayı satır satır okumak istiyorum ve her satır dizinin sonuna eklenir.

CEVAP
18 Temmuz 2010, Pazar


with open(fname) as f:
    content = f.readlines()

list anlamı ve dizi olmadığını tahmin ediyorum.

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

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Gimpology.com Video Tutorials

    Gimpology.co

    3 ŞUBAT 2008
  • monkophile

    monkophile

    25 Temmuz 2007
  • Thom Hall

    Thom Hall

    24 Kasım 2006