Dec-28-2019, 09:22 PM
(Dec-28-2019, 05:07 PM)Dixon Wrote: When I entered 'odds' on one line it worked. I guess the book is in error where is says on page 13 that it's OK to enter the 'odds' numbers on several lines.
No guessing here, this error is yours.
From the book:
Quote:Be sure to enter the code exactly as shown here
/.../
Note how the odds list extends over three lines, despite being a single statement. This is OK, as the interpreter won’t decide a single statement has come to an end until it finds the closing bracket (]) that matches the opening one ([). Typically, the end of the line marks the end of a statement in Python, but there can be exceptions to this general rule, and multiline lists are just one of them (we’ll meet the others later).
You didn’t entered code exactly. You didn’t follow opening and closing brackets.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.