Passing a list of values to a function
<p>Sorry for such a silly question, but sitting in front of the comp for many hours makes my head overheated, in other words — I'm totally confused. 
My task is to define a function that takes a list of words and returns something.
How can I define a function that will take a list of words? </p>

<pre><code>def function(list_of_words):
    do something
</code></pre>

<p>When running this script in Python IDLE we should suppose to write something like this:</p>

<pre><code>&gt;&gt;&gt; def function('this', 'is', 'a', 'list', 'of', 'words')
</code></pre>

<p>But Python errors that the function takes one argument, and six (arguments) are given.
I guess I should give my list a variable name, i.e. <code>list_of_words = ['this', 'is', 'a', 'list', 'of', 'words']</code>, but ... <strong>how?</strong></p>
