def destination_from_source(sources):
    destinations = []
    newsources = []
    for i in range(0, len(sources)):
        srcdst = sources[i].split(':')
        if len(srcdst) == 2:
            destinations.append(srcdst[1])
            newsources[i] = srcdst[0]
        else:
            listing = glob.glob(srcdst[0])
            for filename in listing:
                newsources.append(filename)
                #always use forward slash at destination
                destinations.append(filename.replace('\\', '/'))

    return [newsources, destinations]
Split each of the sources in the array on ':'
dataset/ETHPy150Open kmpm/nodemcu-uploader/nodemcu_uploader/main.py/destination_from_source