import json


def artists(sjsonfile, index):
    """Generates a string with a list of artists in a given index in a sjson.

    Args:
        sjsonfile (string): Entire sjson from Spotify
        index (int): Index of the track from which will be extracted the artists

    Returns:
        string: A string containing a list of the song's artists separated by a space
    """
    artists = ""
    for art in json.loads(sjsonfile)[index]['track']['artists']:
        artists += " " + art['name']
    return artists