3
In my program I want to include characters like these in the print: , and a few more of these. I’m trying to take an array with numbers and turn them into these characters, so it looks like a map/maze.
Note: I want a position [x][y] of the matrix to receive this character as content.
for i in range(10):
for j in range(10):
if matriz[i][j] == 0:
sqm[i][j] = " "
elif matriz[i][j] == 1:
sqm[i][j] = "0"
elif matriz[i][j] == 2:
sqm[i][j] = u("U+25AC")
for i in range(10):
for j in range(10):
print sqm[i][j],
print ""
This way it needs to be already included inside the matrix.
At the beginning of the code I already use:
# -*- coding: utf-8 -*-
But it only covers accentuation. How do I fix it?
I don’t think I explained it properly, but I’ll fix it. I want this character to be included within the pq matrix I print character by character of the matrix on the screen. Ai would be included in some position [x][y], and not just printed on the screen
– Manolloz