Skip to content

This Python code will create a list of binary values, a portion of logic puzzle solver I am working on.

Notifications You must be signed in to change notification settings

ThePrankMonkey/Binary-List

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Binary-List

This Python code will create a list of binary values, a portion of logic puzzle solver I am working on.

As part of my logic puzzle solver, I needed an ability to generate a list of 1's and 0's that corresponded to every possible solution. With the list, I am able to remove any entry that is impossible following the hints in the puzzle. This greatly reduces the number of possible solutions.

The original code used a series of if statements and for loops. Using a list comprehension, I was able to optimize the code dramatically. From about fifteen lines to one. This was fun practice for me.

A live example can be found at: http://repl.it/I78

About

This Python code will create a list of binary values, a portion of logic puzzle solver I am working on.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages