I'm trying to parse a list of values for a key using ConfigParser in Python 3.
I saw that it is possible using the JSON library and Python lists in the config file (Lists in ConfigParser):
[sites]
urls = ["https://google.com", "https://yahoo.com", "https://gmail.com"]
Is it possible to set a delimiter instead? Example, using a colon delimiter:
[sites]
urls=https\://google.com:https\://yahoo.com:https\://gmail.com
You could simply split on a separator of your choice applicable for your list of URLs, e.g.:
Keep in mind that semicolons might be part of URLs. Therefore, a different separator might be a better choice for you.