title: Breaking out of a for loop inside of python string join() Method
body: <p>My code is :</p>
  
  <pre><code>maxlimit = 5
  mystring = ' \r\n '.join([('' if (idx &gt;= maxlimit) else str(name))
                           for idx,name in enumerate(queryset)])
  </code></pre>
  
  <p>How can I to break out of the for loop inside of <code>join()</code> method if <code>idx >= maxlimit</code> ?</p>