Skip to content

Instantly share code, notes, and snippets.

@ChadSki
Created April 22, 2016 05:51
Show Gist options
  • Save ChadSki/b83a99d1f884a3e459bded816696f0cf to your computer and use it in GitHub Desktop.
Save ChadSki/b83a99d1f884a3e459bded816696f0cf to your computer and use it in GitHub Desktop.
# before
if is_solved(square):
print("| {} ".format(solution(square)), end='')
else:
print("| ", end='') # unknown remains empty
# after
fill = str(solution(square)) if is_solved(square) else " "
print("| {} ".format(fill), end='')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment