Set list to a certain length and range
<p>This is my problem.. </p>

<p>write a function that takes, as an argument, a list named aList. It returns a Boolean value True if the elements in the list contains at least one integer and no more than six integers whose values range between 1 and 6. It returns the Boolean False if the list contains any other elements (like strings, or integers outside of the range) or is the wrong length (in that it contains either 0 or more than six elements). Call this function checkList(aList).</p>

<p>I have the length figured out, but can't seem to get it to set the values range between 1 and 6. I am getting the error "List object is not callable." Here's what I have so far:</p>

<pre><code>def checkList(aList):
    if 1&lt;=len(aList)&lt;=6 and range[aList(1,6)]:
        return True
    else:
        return False
</code></pre>

<p>Use <code>set(aList) &lt;= set(range(1, 6))</code>.</p>

python list boolean range