I have a list with two item, each item is a dictionary. now I want to print the item but as these are dicts, python writes the dicts and not the name. any suggestion?
sep_st = {0.0: [1.0, 'LBRG'], 0.26: [31.0, 'STIG']}
sep_dy = {0.61: [29.0, 'STIG'], 0.09: [25.0, 'STIG']}
sep = [sep_st, sep_dy]
for item in sep:
for values in sorted(item.keys()):
p.write (str(item)) # here is where I want to write just the name of list element into a file
p.write (str(values))
p.write (str(item[values]) +'\n' )