<p>我想在代码中执行几行之后停止循环</p>
<pre><code>cursor.execute("select score*100 from daily_stats1 where user_id=102")
rows = cursor.fetchall()
# Convert query to objects of key-value pairs
lastweek1 = list()
i = 0
for row in rows:
lastweek1.append(row[i])
if i == 4:
break
</code></pre>