This code snippet helps you create your own Spotify public playlist containing recommended tracks for each track in a source public playlist using Spotipy library.
Here is the original library;
You should first create a Spotify web API via Spotify for Developers
Get your APP credentials to provide into the code.
You should get and set the following information first;
cid =' ' # Client ID; copy this from your app
secret = ' ' # Client Secret; copy this from your app
username = ' ' # Your Spotify username
#for available scopes see https://developer.spotify.com/web-api/using-scopes/
scope = 'user-library-read playlist-modify-public playlist-read-private'
redirect_uri=' ' # Your app URL