i am trying to read some header values from config file in python while creating CSV.
Working Python file:
headers = ['Column1','Column2','Column3']
...
writer.writerow(header)
...
Using Config: text.conf
[CSV]
headers = 'Column1','Column2','Column3'
Python file
config = configparser.ConfigParser()
config.read(text.conf)
header = config['CSV'].get('headers')
But my csv file looks something like this,
',C,o,l,u,m,n,1,',",",',C,o,l,u,m,n,2,',",",',C,o,l,u,m,n,3,'
Expected:
Column1,Column2,Column3