Hello,
I'm wanting to learn how to make a list out of data from a conf file.
In my conf file I have this:
[someitems]
item1 = 100
item2 = 100
item3 = 100
item4 = 100
In my script, it will read the config then I want to put the keys? into a list.
I then will see if an item is in that list.
mykeys = ['item1', 'item2', 'item3', 'item4']
I do not want the values in the list, just the item1,item2..ec t
Im new to Python so bear with me :/
Thank You
I'm wanting to learn how to make a list out of data from a conf file.
In my conf file I have this:
[someitems]
item1 = 100
item2 = 100
item3 = 100
item4 = 100
In my script, it will read the config then I want to put the keys? into a list.
I then will see if an item is in that list.
mykeys = ['item1', 'item2', 'item3', 'item4']
I do not want the values in the list, just the item1,item2..ec t
Im new to Python so bear with me :/
Thank You
Comment