title: Python: how to print non string array?
body: <p>I'm pretty new to python, and I wonder how I can print objects of my class fracture. The str funcion is set properly, I guess  </p>
  
  <pre><code>def __str__(self):
      if self._denominator == 1:
          return str(self._numerator)
      else:
          return str(self._numerator)+'/'+str(self._denominator)
  </code></pre>
  
  <p>because of</p>
  
  <pre><code>&gt;&gt;&gt;print ('%s + %s = %s' % (f1,f2,f1+f2))
  1/3 + -1/4 = 1/12 
  </code></pre>
  
  <p>Now I'd like to print it properly as a sorted array, and I hoped to get something like</p>
  
  <pre><code>&gt;&gt;&gt;print(', '.join(("Sam", "Peter", "James", "Julian", "Ann")))
  Sam, Peter, James, Julian, Ann
  </code></pre>
  
  <p>But this didn't work for my fracture or even for numbers (like <code>print(' &lt; '.join((1,2,3)))</code>)  </p>
  
  <p>All I got was:</p>
  
  <pre><code>for i in range(len(fractures)):
      if i+1 == len(fractures):
          print (fractures[i])
      else:
          print (fractures[i], end=' &lt; ')
  </code></pre>
  
  <p>Is this really the best solution? That's quite messing up the code, compared on how easy this works with strings...</p>