On Tue, Jun 10, 2008 at 7:45 AM, bob gailer <bgailer at gmail.com> wrote: > questionary = [] > > for line in textdata.split('\n'): > if line: > tag, content = line.split(' ', 1) tag = tag[1:] # strip leading % > if tag == "question": > questionary.append({tag : content}) > else: > questionary[-1].update({tag : content}) or questionary[-1][tag] = content Kent