I have a dictionary with following structure :
{1: {'message': u'test', 'user': u'user1'},
2: {'message': u'test2', 'user': u'user2'}}
I'd like to create a string containing values from the inner dictionary in this form :
string = "<span>test1</span><span>user1</span><br />
<span>test2</span>..."
I've tried everything from dict.keys()
, dict.values()
, (k,v) for k, v in dict
but I cannot make it work. What is the proper way ?