This is some of my basic python code:
width = 8
length = 8
board = [[0 for col in range(length)] for row in range(width)]
print(board)
This prints correctly on PyCharm as an 8x8 grid filled with zeros.
But when I run this it doesn't work:
def main():
width = 8 # letters, col
length = 8 # nums, row
board = [[0 for col in range(length)] for row in range(width)]
print(board)
All I get is "Process finished with exit code 0" and nothing is printed. I checked the same on LeetCode Playground and ran into the same issue.
Any tips on why this might be happening?
Thank you!