Problem assigning input to list
<p>I know this is probably an easy question but after reviewing the documentation for python 2.6.4 I cannot seem to find out what is wrong. This is my file, in it's entirety. The problem I am having is in get_phone_number(). After asking for the amount of phone numbers, I get this error:</p>

<pre><code>Traceback (most recent call last):
  File "/home/charles/workspace/HelloWorld/hello.py", line 27, in &lt;module&gt;
    c.get_phone_number()
  File "/home/charles/workspace/HelloWorld/hello.py", line 17, in get_phone_number
    self.phone_number[phone_count]
AttributeError: Contact instance has no attribute 'phone_number'
</code></pre>

<p>It seems that I am able to define an attribute on the fly, but not if it is a list? Please help!</p>

<pre><code>class Name():
        def get_name(self):
            self.first = raw_input("First Name?\n")
            self.middle = raw_input("Middle Name?\n")
            self.last = raw_input("Last Name?\n")
        pass
    class Address():
        def get_address(self):
            self.street = raw_input("Street?\n")
            self.city = raw_input("City?\n")
            self.zip = raw_input("Zip Code?\n")
        pass
    class Phone_Number():
        def get_phone_number(self):
            count = 0
            phone_count = raw_input("How many phone numbers?\n")
            self.phone_number[phone_count]
            while count &lt; (phone_count - 1):
                self.phone_number[phone_count] = raw_input("Phone Number: ")
                phone_count -= 1
        pass
    class Contact(Name, Address, Phone_Number):
        pass
    c = Contact()
    c.get_name()
    c.get_address()
    c.get_phone_number()
</code></pre>
