On Mon, Aug 20, 2012 at 11:21 PM, Steven D'Aprano wrote:
>
> Indentation has meaning in Python. When you send email, if your email
> program (possibly GMail?) mangles the indentation, your code will become
> invalid, unreadable mess. You need to fix this. Often the easiest way to fix
> this is to
On 21/08/12 06:24, Osemeka Osuagwu wrote:
[...]
p.s I apologise for the lack of comments
Don't apologise for lack of comments, apologise for posting in HTML which
causes your code to be mangled, leading indentation stripped, and generally
turned into an unreadable mess.
Indentation has mean
On Monday 2012 August 20 14:27, Mark Lawrence wrote:
> Give a man a fish, and you feed him for a day; show him how to catch
> fish, and you feed him for a lifetime.
>
> --
> Cheers.
>
> Mark Lawrence.
Teach a man to steal fish and he will live until he dies.
--
Yonder nor sorghum stenches shut l
On 20/08/2012 22:06, Rob Day wrote:
Your problem is in this line, as the traceback shows:
return reduce(lambda x,y:x*y, [data[row][i] for i in range(col, col+4)])
So the thing you have to think about is - what values can col be? The
answer is then in this line:
for col in range(len(data[r
Your problem is in this line, as the traceback shows:
> return reduce(lambda x,y:x*y, [data[row][i] for i in range(col, col+4)])
>
>
So the thing you have to think about is - what values can col be? The
answer is then in this line:
for col in range(len(data[row]))
And since each row of your dat
On 20/08/2012 21:24, Osemeka Osuagwu wrote:
Dear Pythonistas (I hope you don't mind that),
I wrote the following code to find the four adjacent numbers (in any
direction in the array) which, when multiplied together, would yield the
I can't see a Python array anywhere. Do you mean the list of
Dear Pythonistas (I hope you don't mind that),
I wrote the following code to find the four adjacent numbers (in any
direction in the array) which, when multiplied together, would yield the
highest product to be gotten. I finally stumbled on the answer while
studying the data itself but I'm still st