1

Possible Duplicate:
Suppress the u'prefix indicating unicode' in python strings

I assume this is an easy question, I even haven't found an answer on the Web.

I have a string that is unicode encoded and when I print it to the console the string looks like

u'mystring'

but I want to get the string itself without 'u' prefix, like

'mystring'

The question is how to do it?

thanks in advance, guys.

UPDATE:

I use the following code:

    req = urllib2.Request(link)
    req.add_header('User-agent','Mozilla/5.0')
    result = urllib2.urlopen(req)
    print result.url
Community
  • 1
  • 1
Nik
  • 1,508
  • 1
  • 13
  • 15

0 Answers0