title: how can I input a list of lists to make a matrix and change columns by using map function
body: <p>I can't get input a list of lists. I get this error :</p>
  
  <pre><code>TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-4-8c5f7927bb96&gt; in &lt;module&gt;
        9         print(liste)
       10 
  ---&gt; 11 list(map(change, liste ))
       12 
       13 
  
  &lt;ipython-input-4-8c5f7927bb96&gt; in change(liste)
        5 def change(liste):
        6         temp = liste[0]
  ----&gt; 7         liste[0] = liste[-1]
        8         liste[-1] = temp
        9         print(liste)
  
  TypeError: 'str' object does not support item assignment  
  </code></pre>
  
  <p>I tried making the list of lists manually
  I wrote this-> liste = [[1,2,3,4],[2,3,4,5],[6,7,8,9]]
  and it worked but I need to get this as an input.
  Here's my Python code:</p>
  
  <pre><code>liste = input(" mat= ")
  
  def change(liste):
          temp = liste[0]  
          liste[0] = liste[-1]
          liste[-1] = temp
          print(liste)
  
  list(map(change, liste ))  
  </code></pre>