The data at the end of the inventory function looks like:
(u’6’, u’37’, u’LKD’)
The majority of the function (all the appends, etc) is just to flatten the array that’s returned into one line. Before building up that array and casting it to a tuple, info looks like this:
[[u’’, u’37’, u’LKD’], [u’6’, u’’, u’’]]