If you want to flatten the whole csv reader i would use list comprehenstion
import csv
with open('serialnumber.csv', 'r') as f:
reader = csv.reader(f, delimiter=',')
_list = [word for _iter in reader for word in _iter]
print(_list)
You could also use sum:
_list = sum(reader, [])
Example one row csv:
hello,bye
Output:
['hello', 'bye']
Example multi-row csv:
hello,bye,bye
bye,bye,hello
bye,hello,bye
Output:
['hello', 'bye', 'bye', 'bye', 'bye', 'hello', 'bye', 'hello', 'bye']
If your csv file has just one row you could use plain print:
import csv
with open('serialnumber.csv', 'r') as f:
reader = csv.reader(f, delimiter=',')
print(*reader)
<_csv.reader object at 0x00482E30>csv.reader()?