python multiline string in a column to row in csv
<p>Need some idea on how to handle this scenario in python 
i am using python version 3.5.2</p>

<p>And i am 2 days old in python skills.</p>

<p>I have a csv file with a multiline string in a column</p>

<p>Example:   I have 3 column and the 3rd column contains multiline strings</p>

<p><strong>what i have</strong></p>

<pre><code>column1     column2         column3

AppZok |    wendy1  | car one\n bike two\n jeep one
</code></pre>

<p><a href="https://i.stack.imgur.com/95CGK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/95CGK.png" alt="enter image description here"></a></p>

<p>The thrid column contains  whitespace between   car' 'one 
and newlinechar between car one\nbike </p>

<p>And below is what i am expecting the output to be.</p>

<p><strong>what i need</strong></p>

<pre><code>AppZok  wendy1  car     one
AppZok  wendy2  bike    two
AppZok  wendy3  jeep    one
</code></pre>

<p><a href="https://i.stack.imgur.com/YiXae.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YiXae.png" alt="enter image description here"></a></p>

<p>This is code i have now and i just print the 3rd column. I know this is not the way may be, but i  am keep updating the code by looking for answers</p>

<pre><code>import csv
import re
import string

with open('data_post.csv','r') as csvfile:
    lines =csv.reader(csvfile,delimiter=',')
    out_file=open('multi_line_out.csv','w')
    for x in lines :
        #print (x[3])
        data_write=csv.writer(out_file,delimiter='\n')
        #final_data=x[1]
        data_write.writerow(x[2])
</code></pre>

<p>And i result i get is </p>

<pre><code>c
a
r

o
n
e
\
n

b
i
k
e

t
w
o
\
n

j
e
e
p

o
n
e
</code></pre>

<p>Any help on this is highly appreciated</p>