read line

Diez B. Roggisch deets at nospam.web.de
Tue May 6 05:10:34 EDT 2008


moustafa.elmihy at gmail.com wrote:

> hi every body,
> 
> I'm a new python user and I'm making a program to run useing Abaqus
> and there is something I can't do,
> 
> if i have a text file that has a line like this " 10   20  30     40
> 50" and I wana do the coding to put every number of these like 10 or
> 20 in a separate variable .. any suggestions ??

Look up on the file-objects in the documentation, as well as string-methods
such as split and the int-function.

Diez



More information about the Python-list mailing list