I'm adding into the value section of a dictionary a name and the value of properties of an item:
value+=child.get('name') + '\t' + child.text + '\t'
Each piece of text is separated by a tab. So then when I process this value string later, I split on the tabs and have a for loop to iterate over the list.
How can I access both the name and value in the for loop. As for each property I want to get the name and value in one go and write it to a file. Currently the list looks like:
[a,b,a,b,a,b,a,b]
and for each a,b I want to write:
'<' tag name=a '>' b '<' /tag '>'