from datetime import datetime


def create_final_playlist(spotipy_obj, username, playlist_name):
    """Creates and returns ID of new final playlist.

    Parameters:
        spotipy_obj: Spotipy object
        username: Spotify username
        playlist_name: String containing playlist name to be created

    Returns:
        String ID of final playlist created.
    """

    playlist_description = "Chronological list of sorted playlists created on "
    playlist_description += str(datetime.now().strftime("%d/%m/%Y at %H:%M:%S"))
    final_playlist = spotipy_obj.user_playlist_create(username, playlist_name, public=False,
                                                      description=playlist_description)

    return final_playlist.get("id")