could use some help with this problem! (Posting On Python-List Prohibited)

Terry Reedy tjreedy at udel.edu
Wed Feb 21 00:25:29 EST 2018


On 2/20/2018 7:59 PM, Ben Bacarisse wrote:
> Lawrence D’Oliveiro <lawrencedo99 at gmail.com> writes:
> 
>> On Wednesday, February 21, 2018 at 3:10:25 AM UTC+13, Ben Bacarisse wrote:
>>> You almost never /have/ to use nested loops.  Has the course got this
>>> far without introducing the idea of a function?
>>
>> If you are using a function to avoid a nested loop, perhaps that’s not
>> such a smart use of a function...
> 
> Agreed.  And yet it /might/ be a smart use of one.  Nothing about simply
> avoiding a loop is sufficient to make the assessment.

If one were using functional style, one would use tail recursive 
functions instead of *any* explicit loops.


-- 
Terry Jan Reedy





More information about the Python-list mailing list