title: Turn every element of a 2D array from a dic into a string with ' '
body: <p>I'm trying to write a program that displays the board as a list of list (the way as it is) with '_' (hidden squares), '.'
  (bombs), ' ' (empty squares), or '1', '2', etc.</p>
  <pre><code>game = {'dimensions': [2, 4],
              'board': [['.', 3, 1, 0],
                        ['.', '.', 1, 0]],
              'mask': [[False, True, False, False],
                       [False, False, False, False]],
              'state': 'ongoing'}
  </code></pre>
  <p>expected return</p>
  <pre><code>[['.', '3', '1', ' '],
  ['.', '.', '1', ' ']] 
  </code></pre>
  <p>My attempt to change it in place:</p>
  <pre><code>def transform(game):
      for outer in game['board']:
              for inner in outer:
                  if inner ==0: 
                      inner =' '
                  else: 
                      inner = &quot;\'&quot;+str(inner)+&quot;\'&quot;
                      print(&quot;inner&quot;, inner)
                      print(type(inner))
          return game['board'] 
  </code></pre>
  <p>I got print of each inner to be string in the desired format, but the final return didn't get changed at all?? :</p>
  <pre><code> ...
   inner '3'
   &lt;class 'str'&gt;
   inner '1'
   &lt;class 'str'&gt;
   inner ...
    
  
  [['.', 3, 1, 0],['.', '.', 1, 0]]
  </code></pre>