Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open("workbook.csv") as f1:
- with open("new_workbook.csv","w") as f2:
- lines = f1.readlines()
- for line in lines:
- tab = line.split(";")
- col1 = tab[0]
- tab2 = tab[1].strip()[1:-1].split("\r")
- for value in tab2:
- f2.write(col1 + ";" + value + "\n")
- print "done."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement