Skip to content

Instantly share code, notes, and snippets.

@dogweather
Created April 5, 2024 19:17
Show Gist options
  • Save dogweather/daba5b8a7361e2a72b98ea38dd33ea2d to your computer and use it in GitHub Desktop.
Save dogweather/daba5b8a7361e2a72b98ea38dd33ea2d to your computer and use it in GitHub Desktop.
Fixed and Refactored Python code
board = ["R", "N", "B", "Q", "K", "B", "N", "R","P", "P", "P", "P", "P", "P", "P", "P"," ", " ", " ", " ", " ", " ", " ", " "," ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "," ", " ", " ", " ", " ", " ", " ", " ","p", "p", "p", "p", "p", "p", "p", "p","r", "n", "b", "q", "k", "b", "n", "r"]
def Print_board():
x = 0
y = 0
while y < 8:
print("\n")
while x < 8:
print(board[x] + " ", end="")
x += 1
x = 0
y += 1
Print_board()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment