[Tutor] Improving My Simple Game Code for Speed, Memory and Learning

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Jan 5 22:47:03 CET 2015


On 03/01/2015 18:15, WolfRage wrote:
> On 01/03/2015 06:58 AM, Dave Angel wrote:
>> self.transposed_grid = zip(*self.grid)
> zip() sounds confusing. But I am going to try this and see what it gives
> me. But Somehow I think it will require me to understand yield, which I
> still do not totally get how to use.
> Also from the documentation, will this work on my 2d List given that the
> lengths of the lists may not be the same? IE: 4 columns and 8 Rows.
>

The best way to answer this type of question is to try it yourself at 
the interactive prompt, it's a must have tool for any budding Python 
programmer.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence



More information about the Tutor mailing list