def CSVWriter (iterable, outLoc, header="", ):
    """
    Writes an iterable to a CSV file.
    :param iterable: List of list
    :param outLoc: file location. Where to place it.
    :param header: header of the CSV file
    :return: 1
    """
    if not iterable:
        print ("nothing to write")
        return 0

    out = open(outLoc, 'w')

    if header:
        out.write(header+'\n')

    #Only works if iterable is a nested list
    for member in iterable:
        for item in member:
            out.write(str(item)+',')
        out.write('\n')

    print("write to "+outLoc+" successful.")
    return 1