Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.01; 'bits': 0.07; 'received:verizon.net': 0.07; 'terry': 0.07; 'python': 0.08; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'subject:show': 0.09; 'wrote:': 0.15; 'reedy': 0.16; "subject:'.": 0.16; 'pm,': 0.16; '2.x': 0.19; 'jan': 0.19; 'header:In-Reply- To:1': 0.22; 'string': 0.26; "i'm": 0.27; 'unicode': 0.29; 'environment': 0.29; 'not.': 0.30; '(ie.': 0.30; 'list': 0.32; 'to:addr:python-list': 0.34; 'header:X-Complaints-To:1': 0.34; 'header:User-Agent:1': 0.34; 'agree': 0.35; 'starting': 0.35; 'thank': 0.35; 'data.': 0.36; 'some': 0.37; 'using': 0.37; 'received:org': 0.38; 'subject:: ': 0.38; 'perhaps': 0.39; 'header :Mime-Version:1': 0.39; 'subject:with': 0.39; 'to:addr:python.org': 0.39; 'you.': 0.62 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Strings show as brackets with a 'u'. Date: Tue, 26 Jul 2011 23:04:58 -0400 References: <9843961d-cc18-45f8-b33a-e2ca716df283@d8g2000prf.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-74-109-121-73.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 In-Reply-To: <9843961d-cc18-45f8-b33a-e2ca716df283@d8g2000prf.googlegroups.com> 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: 1311735911 news.xs4all.nl 23940 [2001:888:2000:d::a6]:33747 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10368 On 7/26/2011 9:18 PM, goldtech wrote: > Thank you. So what is happening? Is it that I'm in an environment that > is not unicode and python is telling me the string (ie. n[0]) is > unicode? Yes, n is a list and n[0] is a unicode string and you are using some 2.x, which is ascii/byte string based. Python 3 is unicode based. If you do not *need* to use 2.x and are just learning Python, I personally recommend starting with Python 3. Others agree with me, still other do not. I would add 'especially if you want to use unicode'. Rick gave you some good advice, perhaps worth re-reading. What you need are investigative skills, and not just bits of data. -- Terry Jan Reedy