Creating list object in Python
<p>I have a list of objects (this is for a game) and I want to make the list itself an object.</p>

<p>The first object is the card:</p>

<pre><code>class card (object):
    def __init__ (self,suit,value):
        self.suit = suit
        self.value = value


    def cardpointvalue(self):
    #not relevant, basically says if card is this return this value for it
    # there is also a __str__ function and a ___repr___ function, don't think
    # they are important
</code></pre>

<p>So that's my card object, I also have a hand object which is where I'm having trouble.</p>

<pre><code>class hand (object):
    def __init__ (self,list_cards):
         self.list_cards = list_cards

    def hand_value (self):
        for i in list:
           handpointvalue += (i.cardpointvalue())
        return handpointvalue
</code></pre>

<p>In my main(), which is where I'm having trouble.</p>

<p>I have lists where I make each card in the deck into a card object.  I then pass them into the person's hand called list1 and list2 (for each player, for the sake of simplicity I'll deal with list1 only).</p>

<p>Once I've passed each player's cards into their list.  I try to make the list into the hand object then run the <code>handpointvalue</code> function on them.</p>

<p>So</p>

<pre><code>for i in range(10):
    one_card = card_deck.pop(0) #each card is an object at this point
   list1.append(one_card)

print (list1) #just testing, get a list of each card object
</code></pre>

<p>Here is where I have trouble. I've tried multiple things, the latest one being:</p>

<pre><code>hand(list1)
print (list1.handpointvalue())
</code></pre>

<p>Why is this not working?  How do I make this object list into a object itself?</p>
