Idiomatic backtracking in Python

Mark Lawrence breamoreboy at
Mon Jan 26 09:06:16 CET 2015

On 26/01/2015 00:32, Ben Finney wrote:
> Johannes Bauer <dfnsonfsduifb at> writes:
>> So, I would like to ask if you have a Pythonic approach to
>> backtracking problems? If so, I'd love to hear your solutions!
> I'm not aware of what the problem is. “Back-tracking” doesn't have a
> general meaning I recognise beyond random access into a data structure.
> So a Python list is the obvious starting point.
> Do you have a specific meaning of “back-tracking” that implies
> particular problems that are difficult to solve?

As good a definition here as 
any.  As elsewhere in this thread it mentions sudoku.  To me this is a classic example of putting theory 
into practice.  Read and weep :)

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 Python-list mailing list