On 29/12/14 23:50, Patti Scott wrote:
Could someone clarify "Modularize code rather than copying and pasting?"
Joel and Danny have given the basic answer in terms of putting
loose code into functions. But it goes a little further too.
You can be tempted to copy/paste functions because they alm
-
On Tue, Dec 30, 2014 12:34 PM CET Alan Gauld wrote:
>On 29/12/14 23:50, Patti Scott wrote:
>> Could someone clarify "Modularize code rather than copying and pasting?"
>
>Joel and Danny have given the basic answer in terms of putting
>loose code into functions. But it
This is my most recent rendition of the code. It still needs to be
improved. Below I am answering some questions that were posed. Also I
think my code is currently wrong because I think the print_by functions
are both printing the list the same way. Tomorrow I will fix this and
improve the code
>> What are the _operations_ you want to support? Can you say more about
>> this?
>
> I need to support lookups, no insertions or deletions are required. This
> code will be used to quickly lookup nodes, and check for specific patterns
> by checking the nodes values in either a row or column.
As
On Tue, Dec 30, 2014 at 2:37 PM, Danny Yoo wrote:
> If that's the case, then none of this requires linked list storage.
>
> Instead, we can represent this as a list of rows. Each row element
> would be itself a list of tiles. In short, a matrix. See:
> https://docs.python.org/2/faq/programming.
On 2014-12-30 14:40, wolfrage8...@gmail.com wrote:
True, I could use a multidimensional list. And originally I was using
I wanted the ability to quickly search across a row or
up and down a column and so the added benefit of the linked list was
that it simply requires me to access the next nod