A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/074313.html below:

Easy question

Easy questionSean 'Shaleh' Perry shaleh at valinux.com
Wed Apr 11 17:03:58 EDT 2001
On 11-Apr-2001 Duncan Smith wrote:
> I need to read some data from a file.  Each (tab delimited) row corresponds
> to an array index eg.
> 
> 0    0    0    0    0    0
> 0    1    0    0    0    0
> 0    0    1    0    0    0
> ...
> 
> And I need something like,
> 
> [[0,0,0,0,0,0], [0,1,0,0,0,0], [0,0,1,0,0,0], ...]
> 
> What's the best way of doing this?  Cheers in advance.
> 

look at string.split().


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4