title: How to square each element in 2D list using map function python
body: <p>I have a 2D list:</p>
  <pre><code>list1 = [[2,3,4], [3,2]]
  </code></pre>
  <p>I tried:</p>
  <pre><code>print( list(map(lambda x :(x**2), arr1 )))
  </code></pre>
  <p>but it gives error</p>
  <blockquote>
  <p>TypeError: can't multiply sequence by non-int of type 'list'</p>
  </blockquote>
  <p>How can I loop inside a map...?</p>