def simpleflow(playlist, attribute="valence"):
    """
        The fastest and most simple flow sort - sort songs based on one of the
        song attributes, from lowest to highest value. Accepts a playlist object
        containing tracks and "attribute" parameter to sort by, which is
        one of the attributes defined in Track object. O(n log n)

        Returns a list of Tracks in sorted order, or None if there is an error
    """
    try:
        unsortedlist = playlist.tracks
        sortedlist = sorted(unsortedlist, key = lambda x: getattr(x, attribute))
    except Exception as e:
        print(e)
        return(None)
    return(sortedlist)