Break statement in Python
<p>I am trying to break out of a for loop, but for some reason the following doesn't work as expected:</p>

<pre><code>for out in dbOutPut:
    case_id = out['case_id']
    string = out['subject']
    vectorspace = create_vector_space_model(case_id, string, tfidf_dict)
    vectorspace_list.append(vectorspace)
    case_id_list.append(case_id)

    print len(case_id_list)

    if len(case_id_list) &gt;= kcount:
        print "true"
        break
</code></pre>

<p>It just keeps iterating untill the end of <code>dbOutput</code>. What am I doing wrong?</p>
