title: Outputting Specific Prosperities of an Array(List) of Objects in Python
body: <p>I have an class Student which has an array(list) of Objects called Students. I am trying to output the names of all the students in the array.</p>
  <pre class="lang-py prettyprint-override"><code>class Student(object):
      name = &quot;&quot;
      age = 0
      major = &quot;&quot;
  
      # The class &quot;constructor&quot; - It's actually an initializer 
      def __init__(self, name, age, major):
          self.name = name
          self.age = age
          self.major = major
  
  Students = []
  
  Students.append(Student(&quot;Dave&quot;,23,&quot;Chem&quot;))
  Students.append(Student(&quot;Emma&quot;,34,&quot;Maths&quot;))
  Students.append(Student(&quot;Alex&quot;,19,&quot;Art&quot;))
  
  print(Students[0].__dict__)
  print(Students[1].__dict__)
  print (Students[0])
  </code></pre>
  <p>Both the ways I have found and tired do not output the specific name but the location or the whole object. Is there a way to just output the name? For example output Students[0] name Dave</p>
  <pre><code>{'name': 'Emma', 'age': 34, 'major': 'Maths'}
  &lt;__main__.Student object at 0x000001FCDE4C2FD0&gt;```
  </code></pre>