I'm just learning about python. I'm fairly new.
I have the following code that takes in a csv file and replaces the filenames and appends the domain to it:
import csv
...
cr.reader(open('foo.csv', 'rb'))
...
for i in rows enumerate(csvreader):
images = 'http://www.foo.com/%s' % row[-3], 'http://www.foo.com/%s' % row[-4]
row[-3], row[-4] = images[0], images[1]
There a more elegant way to simplify appending the url to the filenames?
row[-3], row[-4] = 'http://www.foo.com/' + row[-3], 'http://www.foo.com/' + row[-4]