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

  • BaaaStuds's channel

    BaaaStuds's

    10 Mart 2009
  • Hak5DarrensVlog

    Hak5DarrensV

    11 EYLÜL 2009
  • TheDroidDemos

    TheDroidDemo

    15 ŞUBAT 2011