Parse variable into variables >Re: Apology
Jason Orendorff
jason at jorendorff.com
Tue Feb 26 23:21:35 EST 2002
Timothy Rue wrote:
> vic['AI']['1'], vic['AI']['2'], vic['AI']['3'] = varset.split()
>
> is there a way to add the readline() into this line?
> ..... = testfile.readline().split()
All of this is correct. You might even want to just do:
vic['AI'] = testfile.readline().split()
but of course that makes vic['AI'] a list of strings,
not a dictionary. Which may or may not be okay.
## Jason Orendorff http://www.jorendorff.com/
More information about the Python-list
mailing list