[Tutor] populating an array or using a dictionary
bryan.fodness at gmail.com
Sun Oct 21 21:11:34 CEST 2007
it doesn't fix the problem, now it says there is a syntax error on the equal
On 10/21/07, Alan Gauld <alan.gauld at btinternet.com> wrote:
> "Bryan Fodness" <bryan.fodness at gmail.com> wrote in
> > d, fs1, fs2, fs3, fs4, fs5, fs6, fs7, fs8, fs9, fs10,
> > fs11, fs12, fs13, fs14, fs15, fs16, fs17, fs18, fs19,
> > fs20, fs21, fs22, fs23, fs24, fs25, fs26, fs27, fs28,
> > fs29, fs30, fs31, fs32, fs33, fs34, fs35, fs36, fs37,
> > fs38, fs39, fs40 = line.split()
> Because your tuple spans multiple lines I think you
> will need to put parens round it.
> >>> a,b,c,d
> Traceback (most recent call last):
> File "<input>", line 1, in ?
> NameError: name 'a' is not defined
> >>> (a,b,c,d
> So starting with a paren tells Python to ignore the newline.
> Without it it gets confused about what you want to do.
> Alan Gauld
> Author of the Learn to Program web site
> Tutor maillist - Tutor at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor