Strings show as brackets with a 'u'.

Ulrich Eckhardt ulrich.eckhardt at
Mon Jul 25 04:00:57 EDT 2011

Chris Angelico wrote:
> On Sun, Jul 24, 2011 at 10:33 AM, goldtech <goldtech at> wrote:
>> I'm using using Idle on winXP, activestate 2.7. Is there a way to
>> suppress this and just show 174  in the shell ?
>> A script reading data and assigns 174 to n via some regex. Links on
>> this appreciated - I've tried to understand unicode before, will keep
>> trying...thanks.
> There's two things there. Firstly, your regex is returning a list, not
> a string; and secondly, you are seeing repr(n) instead of just its
> content. Try:
>>>> print(n[0])
> This should print just the value.
> (Pro tip: rantingrick is a troll. You can safely ignore him.)

If he's a troll, he's one of the better trolls here IMHO because he gave the 
best advise in this thread. You just gave the OP a fish, he provided a 
valuable advise on fishing itself.


Domino Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

More information about the Python-list mailing list