0

I have multiple strings separated by commas in config.ini file which is read by my script.

Inside config.ini

[names]
exception_names = chris,james,jordan,michael,...

It is read in my python script by

exception_name_list = config['names']['exception_names'].split(',')

which works perfectly. However exception_names in config file is becoming really long and if I send some to next line it will contain \n inside string. What is most readable way to add bunch of strings in config file that will be separated by commas?

haneulkim
  • 4,406
  • 9
  • 38
  • 80

1 Answers1

0
exception_name_list = config("exception_names", cast="CommaSeparatedStrings")