Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed5.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'string.': 0.04; 'class,': 0.07; 'function,': 0.07; 'received:mail-vc0-f174.google.com': 0.09; 'alist': 0.16; 'distinction': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'str()': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'string,': 0.17; 'subject:problem': 0.22; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'received:209.85.220.174': 0.29; 'str': 0.29; 'function': 0.30; 'print': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'list': 0.35; 'pm,': 0.35; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'anything': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'takes': 0.39; 'header:Received:5': 0.40; 'more.': 0.62; 'jul': 0.65 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Abo/+GmtS/VdUQ1F5TrIxVupLYZQ5AcgSeJD8ntxvFA=; b=PKhlZll1DR+ICUWO3XsTLZznhG1yFss61RiV9wfhxS7JifaDoCsNk4cgt8FlZk18w+ QcvVJ9eTWZ9IYataT99eaU9+kgZ8ACYjEE45/L9umSO+5RPLKo694vifNKzpNgACRwA1 Z9/Ml/PLKPS0ql87UTnmVAgOnpuU70HpDoxzFrkFe05EO1M7WPfqsJq6gh2xKi53p+9r y/D3KvwDX7lGykJHciGiDVWsyI5JKsfUOak+zqASF+zNEsbBI9FassetkTzsCpFvWcqN ZG/7J0f98jmLRththL2isqwFmCVxEhE63ZBYr7pSc6GF/xm8emi4piX45SguTDXG2MsC rtiQ== MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 4 Jul 2012 17:40:44 +1000 Subject: Re: a problem about "print" From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1341387647 news.xs4all.nl 6989 [2001:888:2000:d::a6]:34675 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:24851 On Wed, Jul 4, 2012 at 5:28 PM, levi nie wrote: > aList=str(aList) > print aList > print aList[2] The str() function takes pretty much anything and returns a string. When you subscript a string, you get characters. It's not a list of numbers any more. (Technically str is a class, not a function, but that distinction doesn't matter.) ChrisA