f=open("kymmerida.csv", "r") #terve csv m=[] for rida in f: m.append([jaam for jaam in rida[:-2].split(";")]) f.close() m2=[ [ m[v][r] for v in range(len(m)) ] for r in range(len(m[0])) ] f2=open("p88ratud.csv", "w") for rida in m2: f2.write(";".join(rida)+"\n") f2.close()