I have the following set of simple examples of code, none of which are doing what I want:
import json
a = "u'Kolo Tour\xe9'"
print a
b = (a.decode('cp1252'), 1)
print b
c = (a, 1)
print c
d = ','.join((b.decode('cp1252')))
print d
The final example is throwing up an error about a tuple having no method for decoding. What I want my final item to look like is:
Kolo Touré,1
Can anyone tell me what I am doing wrong and what the correct syntax I need to fix my issue is please?
Thanks
EDIT:
A segment of the actual source data I am attempting to parse in my full scale code prints like this to the screen in both command shell and python IDLE:
(u'Jos\xe9 Enrique', 14230, 29, 3, u'DL', 184, 76, True, False)
unicodeliteral represented in a string?