Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.021 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'suppress': 0.07; 'string;': 0.09; 'subject:show': 0.09; 'am,': 0.13; 'wrote:': 0.15; 'assigns': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'rantingrick': 0.16; "subject:'.": 0.16; '\xa0in': 0.16; '>>>': 0.16; 'received:209.85.210.174': 0.19; 'received:mail-iy0-f174.google.com': 0.19; 'ignore': 0.21; 'header :In-Reply-To:1': 0.22; 'there.': 0.25; 'tried': 0.27; 'seeing': 0.28; 'message-id:@mail.gmail.com': 0.28; 'script': 0.29; '24,': 0.29; 'idle': 0.29; 'shell': 0.29; 'unicode': 0.29; 'sun,': 0.30; 'print': 0.32; 'chris': 0.32; 'value.': 0.32; "i've": 0.33; 'to:addr:python-list': 0.34; 'instead': 0.34; 'there': 0.34; 'appreciated': 0.34; 'things': 0.34; 'safely': 0.35; 'try:': 0.35; 'some': 0.37; 'using': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'returning': 0.38; 'two': 0.38; 'should': 0.39; 'data': 0.39; 'list,': 0.39; 'subject:with': 0.39; "there's": 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'your': 0.60; 'show': 0.67; 'content.': 0.71; '10:33': 0.84; '2.7.': 0.84; "\xa0i'm": 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=NE65QUdF9Kr462eSQa2OZCAjFqHxtft2i5ncBZzIbcg=; b=G42YfwOYmeiXbfxEn5XWCyUX4+tYpa7pHzag6jBdnfCOKjOWPFB/NqmToNVRitOTqN 2ZnbcDjid/f9441J13rEepnWwNMNKi6uUb9/sRt8EXwOUPR1j2Yr7J7IFukSUSr/mo1a Ytk8c3V20Qr4OhEdzWxxXIocAr5XANWqBEHZA= MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 24 Jul 2011 10:52:47 +1000 Subject: Re: Strings show as brackets with a 'u'. From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1311468776 news.xs4all.nl 23941 [2001:888:2000:d::a6]:40463 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10181 On Sun, Jul 24, 2011 at 10:33 AM, goldtech wrote: > > =A0I'm using using Idle on winXP, activestate 2.7. Is there a way to > suppress this and just show 174 =A0in 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.) Chris Angelico