For some reason, when I do the code...
def encode(): result2 = [] print result for x in result: result2 += str(x) print resul
Using map http://docs.python.org/library/functions.html#map
In [2]: input_list = [123, 456, 789] In [3]: output_list = map(lambda x:str(x), input_list) In [4]: output_list Out[5]: ['123', '456', '789']