passing parameter with map function
<p>Stating with </p>

<pre><code>a = ['abc', 'efg', 'hij']
</code></pre>

<p>I want to get</p>

<pre><code>a = ['abc!', 'efg!', 'hij!']
</code></pre>

<p>But obviously without the use of <code>for elements in a:</code>...because it is not cleaver and I want to understand more about the <code>map</code> function and how it passes parameters. </p>

<p>So I try to append a <code>'!'</code> to all elements of the lists using the map function. But before doing so, <code>append</code> is a <code>list</code> method but not a <code>str</code> method.  </p>

<pre><code>b = map(list,a) # gives : a = [['a','b','c'],['d','e','f'],['h','i','j']]
a = map(list.append(['!']), b) 
</code></pre>

<p>That last map function returns a TypeError:</p>

<pre><code>TypeError: append() takes exactly one argument (0 given)
</code></pre>

<p>I wish to know if it is possible to pass parameter to the method used by <code>map</code>. 
Thank. </p>