Home

Hello

I'm sure there's a much easier way to read a two-column, CSV file into
an array, but I haven't found it in Google.

Should I use the Array module instead?

=========
a = []
i = 0

#item<TAB>item<CRLF>
p = re.compile("^(.+)\t(.+)$")

for line in textlines:
m = p.search(line)
if m:
a[i,0] = m.group(1)
a[i,1] = m.group(2)
i = i + 1

for i in a.count:
for j in 2:
print a[i,j]
=======

Thank you.

previous
next

Re: recursion
Re: C++ Primer ex 7.31
converting 'float (*)[4]' to 'const float**'
Re: C++ Primer ex 7.3
Re: Is this scenario a good use for polymorphic functions
Fundacja Hobbit
Krwinka
Mimo Wszystko
Nasze Dzieci
Dzieci Niczyje