the_list = [['a','b','c'],['b','c','d'],['c','d','e']]
output = []
for k in the_list:
output.append(str(k)[1:-1].replace(',',"\t").replace("'",'').replace(' ',''))
print output
#['a\tb\tc', 'b\tc\td', 'c\td\te']
#for line in output:
#out_file.write(line + '\n')
I'm trying to get the list into tab-delmited format so i can write to an .xls file but the only way i could figure out how to do it seemed pretty monotonous . I was wondering if anyone knew a quicker, more efficient, and more 'pythonic' way of writing a list to an .xls