[Tutor] Another set question

Phil phil_lor at bigpond.com
Sat Apr 29 19:58:47 EDT 2017


On Sat, 29 Apr 2017 20:27:17 +1000
Ben Finney <ben+python at benfinney.id.au> wrote:

> Why is the data in such a state that you can't decide how to use it
> until you know whether it is a set versus a string? Can the data be
> handled differently? We'll need to know what you're trying to achieve,
> to answer properly.

Thank you Ben. A rethink of the problem during the 20 hours since I posted my most recent question has led to a solution.

I'm rewriting a C++ program that I wrote 15 years ago to solve sudoko puzzles. I'm having some difficulty with the translation in part because of my poorly documented code and because Python does some things differently. I've abandoned my original translation attempt and have started afresh which is probably a good idea. It took me months to solve come up with a working solution in C++ whereas I almost have a working solution in Python in a little over a week.

The strings are the given numbers while the sets are the likely candidates.

-- 
Regards,
Phil


More information about the Tutor mailing list