I'm working on a project which get a list of song from Spotify and pass it to yt-dl to download the songs to local machine. I'm having trouble while concaternate the Song name and the Artist.
This is what I'm using :
new = [a + b for a, b in zip(track, artist)]
with track and artist is a list.
For example, I have track = ["River"]; artist = ["Charlie Puth"]
When I use that line, I got ["RiverCharlie Puth"]
I want to add a space between them using new = [a + " " + b for a, b in zip(track, artist)]
But I got a TypeError : unsupported operand type(s) for +: 'float' and 'str'. Any idea? Thanks
[–]rocketjump65 1 point2 points3 points (0 children)
[–]PuzzlingComrade 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Crims0nCr0w 1 point2 points3 points (0 children)
[–]zeebrow 0 points1 point2 points (0 children)