0

I am importing values from a config file using configparser. It works fine for single values but I would also list to import a list of email addresses and I cannot figure out how to do it.

Config file has

[Mail]
maillist = ['one@mail.xxx', 'two@mail.xxx', 'three@mail.xxx']

This reads in as

['one@mail.xxx', 'two@mail.xxx', 'three@mail.xxx'] 

and it is a string. How can I do it so that it reads as a list?

khelwood
  • 52,115
  • 13
  • 74
  • 94
Mick Sulley
  • 81
  • 10

0 Answers0