Parse variable into variables >Re: Apology
jason at jorendorff.com
Wed Feb 27 05:21:35 CET 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