Hello again. I have this code that is able to read from from.vars

for question in questions:
        options=[question['option_'+c] for c in ['A','B','C','D'] if
question['option_'+c].strip()]
        stuff.append(TABLE([TR(question.question)],
[TR(INPUT(_type="radio",_name=question.id, _value=str(i+1)),item) for
i,item in enumerate(options) ]))
        a+=1

    form=FORM(H2('Your answer'),stuff,BR(),BR(),
              INPUT(_type='submit', _value=str(T('Submit answer')))
             )

    if form.accepts(request.vars, session):

            total=form.vars
    return dict(question=question,stuff=stuff,form=form, total=total)


The problem is is that I don't know how to access the "<Storage {'3':
'4', '2': '3'}>" that is returned. How can I access the second value,
such as the 4 in the pair '3': '4'?

Ideally I would like to take the total of all the latter values. If
you could show me how to do that as well, I would much appreciate that.

Reply via email to