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

  • Android Authority

    Android Auth

    3 NİSAN 2011
  • Jack Vale Films

    Jack Vale Fi

    8 ŞUBAT 2007
  • Tracy Hairston

    Tracy Hairst

    22 Mayıs 2009