write output with delimiter in python
<p>I want to save my output as csv file with custom name and delimiter.
I tried this code but now works for me.</p>

<pre><code>out = open('out.csv', 'w')
for row in l:
for column in row:
    out.write('%d;' % column)
out.write('\n')
out.close()
</code></pre>

<p>Here is my data</p>

<pre><code>100A7E54111FB143    
100D11CF822BBBDB    
1014120EE9CCB1E0    
10276825CD5B4A26    
10364F56076B46B7    
103D1DDAD3064A66    
103F4F66EEB54308    
104310B0280E4F20    
104E80752424B1C3    
106BE9DBB186BEC5    
10756F745D8A4123    
107966C82D8BAD8     
</code></pre>

<p>I want to save like this </p>

<pre><code>input.csv
input_id data
number   107966C82D8BAD8 | 10756F745D8A4123 | 106BE9DBB186BEC5
</code></pre>

<p>The delmiter would be '|'.The data is in dtype:object</p>

<p>Any help will be appreciated.</p>