I have a code that writes a bunch of lines to csv files. It writes what i want, but... it inserts brackets in each column... The code is:
root_text_csv = "C:/Users/s/Desktop/text/knife"+numarul_folderelor+".csv"
fisier_text_knife = csv.writer(open(root_text_csv,'wb'))
row_test = []
for filenames in os.listdir(foldere_prrra):
knife = filenames.replace("<SP>", " ").replace(".sys", "")
test = ['cut '+knife+' off for fuged,', 'cut '+knife+' off,', 'cut '+knife+' fool alabala,', 'cut '+knife+' nieh,', 'prrra '+knife+' alabala,',
'cut '+knife+' fuged streaming,', 'cut '+knife+' alabala fuged,', 'cut '+knife+' off alabala,', 'prrra '+knife+' fool alabala,',
'cut '+knife+' off fuged,', 'prrra '+knife+' niether alabala,', 'cut off '+knife+' for fuged,' 'cut '+knife+' fuged fool alabala,',
'cut '+knife+' off niether,', 'where to cut '+knife+',', ''+knife+' fool alabala off,', 'steel '+knife+' off fuged,', 'cut '+knife+' fuged niether,',
''+knife+' fool alabala off,', 'fuged streaming '+knife+',', 'cut '+knife+' niether,', 'cut '+knife+' fuged,', 'red '+knife+' off,', ''+knife+' off,',
'red '+knife+',', 'cut '+knife+',', ''+knife+' fuged,', 'fuged '+knife+',', ''+knife+' off,', 'off '+knife+',', ''+knife+',']
random.shuffle(test)
scris = [x for x in test if len(x) <= 30]
row_test.append(scris) #row_test.append(scris[0])
fisier_text_knife.writerow(row_test)
If i replace the row_test.append(scris[0:7]) with row_test.append(scris[0]) it writes only one string off them all(but writes it without the brackets -->[ ]<--).
I want to write 7 or 8 lines. I wasted my brain on this code.
Thank you for the time.