Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.

Make adding x songs per artist to tracklist a function #1

Open
codesue opened this issue Aug 15, 2018 · 0 comments
Open

Make adding x songs per artist to tracklist a function #1

codesue opened this issue Aug 15, 2018 · 0 comments

Comments

@codesue
Copy link
Owner

codesue commented Aug 15, 2018

This bit of code is used twice and could be extracted and refactored as a function

song_count = 0
for track in artist_top_tracks["tracks"]:
	if song_count < 5:
		list_of_tracks.append(track["id"])
		song_count += 1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant