title: output is not printing string in python
body: <p>i have made a program but the output that i'm getting is </p>
  
  <pre><code>(&lt;q3v3.Student instance at 0x023BB620&gt;, 'is doing the following modules:', ' &lt;q3v3.Module instance at 0x023BB670&gt; &lt;q3v3.Module instance at 0x023BB698&gt;')
  </code></pre>
  
  <p>For example , the above output should give me Alice is doing following module : biology, chemistry</p>
  
  <p>Help</p>
  
  <p>this is my full code:</p>
  
  <pre><code>class Student : 
      def __init__(self,students): 
          self.students= students 
          print self.students
  
     #def __str__(self):  # when i used this i've got error type TypeError: __str__ returned non-string (type NoneType)
      #print str(self.students)
  
  
  class Module:
      def __init__(self,modules):
          self.modules = modules
          print self.modules
  
      #def __str__(self):
          #print str(self.modules)
  
  
  class Registrations (Student,Module):
      def __init__(self):
          self.list= []
          self.stulist = []
          self.modulist= []
  
      def __iter__(self):
          return iter(self.list)
      def __str__(self):
         return str(self.list)
  
  
      def add(self,students,modules):
          self.list.append((students,modules))
          #print (self.list)
  
  
  
      def students(self,modules):
          for i in self.list:
              if i[1] == modules:
                  self.modulist.append((i[0]))
          return iter(self.modulist)
  
  
      def __str__(self):
          return str(self.students)
  
  
      def modules(self,students):
          for i in self.list:
              if i[0] == students:
                  self.stulist.append((i[1]))
          return iter(self.stulist)
  
  
      def __str__(self):
          return str(self.modules)
  </code></pre>
  
  <h1>i need to import my program to be able to run it to this :</h1>
  
  <pre><code>from q3v4 import *
  
  
  james = Student('james')
  alice = Student('alice')
  mary = Student('mary')
  
  agm = Module('agm')
  ipp = Module('ipp')
  
  r = Registrations()
  r.add(james,agm)
  r.add(alice,agm)
  r.add(alice,ipp)
  
  
  mstr = ''
  for m in map(str,r.modules(alice)):
      mstr = mstr+' '+m
  print(alice, 'is doing the following modules:', mstr)
  sstr = ''
  for s in map(str,r.students(agm)):
     sstr = sstr+' '+s
  print(agm, 'has the following students:', sstr)
  
  print(r)
  </code></pre>