def listdict2envdict(listdict):
 for key in listdict:
  if isinstance(listdict[key], list):
   listdict[key] = os.path.pathsep.join(listdict[key])
 return listdict

def listdict2envdict ( listdict ) : for key in listdict : if isinstance ( listdict [ key ] , list ) : listdict [ key ] = os . path . pathsep . join ( listdict [ key ] ) return listdict
dict of lists --> dict .