خرید بک لینک

Vote count: 0

I have some questions about how can I read a .txt file and build one list inside other list through this file.

look:

I have this file:

1 2 3
4 5 6
7 8 9

Right now I'm using numpy to read the file:

DataIn = numpy.loadtxt('jpegOut.txt')

the retu is this:

print DataIn
[[1 2 3]
[4 5 6]
[7 8 9]]

But I need this:

[[1 2 3],
 [4 5 6],
 [7 8 9]]

Could you help me?

Thanks in Advance

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 22 اسفند 1394 ساعت: 19:51

صفحه بندی