Anonymous user
24 game/Solve: Difference between revisions
m
→{{header|Python}}: help the code highlighter
(→{{header|Python}}: Updated to also find solutions involving two sets of brackets) |
m (→{{header|Python}}: help the code highlighter) |
||
Line 70:
def solve(digits):
>>> for digits in '3246 4788 1111 123456 1127'.split():
solve(list(digits))
Line 85:
Solution found: ( 1 + 2 ) * ( 1 + 7 )
'( 1 + 2 ) * ( 1 + 7 )'
>>>
digilen = len(digits)
# length of an exp without brackets
|