Why there is a section named "DEFAULT" but with no values in my config text file?
I have a text file "policy.txt" with my configurations in it. So I was running a simple configparser code in Python which looks like this:
>>> from configparser import ConfigParser
>>> config = ConfigParser()
>>> config.read('policy.txt')
['policy.txt']
>>> for key in config:
... print(key)
...
The numbers you see (1 to 5) are the section names in my policy.txt file. This is the result:
DEFAULT
1
2
3
4
5
So I was wondering what is stored in "DEFAULT" section. Then I ran this code segment:
>>> for key in config['DEFAULT']:
... print(key)
...
...
>>>
But it seems like the section isn't storing anything. So why is it there in my policy.txt file?
Any helpful idea is appreciated.