python - difference between print and return
<p>If I print the result of the <code>for loop</code> in this <code>function</code>:</p>

<pre><code>def show_recommendations_for_track(tracks = [], *args):

    results = sp.recommendations(seed_tracks = tracks, limit=100)
    tracks = results['tracks']
    for track in tracks:
        print track['name']
</code></pre>

<p>It prints one hundred track names.</p>

<p>If I swap <code>print</code> for <code>return track['name']</code>,</p>

<p>it prints only one track name.</p>

<p>why?</p>