I am trying to create a boggle came but the display shows brackets. Please help me remove ALL the brackets and apostrophes when I run the program
here is my numpy grid array:
Im pretty new to python and I tried: str(grid).lstrip('[').rstrip(']')
grid = np.array([['x', 'x', 'x', 'x',], ['x', 'x', 'x', 'x',], ['x', 'x', 'x', 'x',], ['x', 'x', 'x', 'x',]])```
and here's a print output:
[['M' 'Z' 'S' 'T']
['Y' 'U' 'C' 'R']
['H' 'G' 'D' 'A']
['O' 'E' 'E' 'W']]
If you want a "clean" print out (i.e. without the string markers
'
) then try the following:Output:
Look here to understand how
join
works.