python csv list by rows instead of columns
Question: I have a script that can take the final redirection url and save it into CSV
file.

The script write codes in 1 column for example A1 then A3 then A5

How to make it write the codes by rows for example A1 B1 C1 D1

please see [this](http://i.imgur.com/Gl5jdrf.jpg) the red color that what i
want, the blue color that is the final result and i don't want it to be like
that ( the list in 1 column and goes down A1 A3 A5 and there are a spaces
between every cell !! )

this is my final script

    
    
    import urllib2
    import csv
    import sys
    
    url = 'http://www.test.com'
    
    u = urllib2.urlopen(url)
    localfile = open('C:\\test\\file.csv', 'a')
    writer = csv.writer(localfile)
    writer.writerow([u.geturl()])
    localfile.close()
    


Answer: Why not just create CSV by yourself if it will have only one row?

    
    
    import urllib2
    
    url = 'http://www.google.com'
    
    u = urllib2.urlopen(url)
    localFile = open('C:\\file.csv', 'ab')
    localFile.write(u.geturl() + ",")
    
    localFile.close()
    

