X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 78.192.65.63 Path: csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!news.muarf.org!news.roellig-ltd.de!open-news-network.org!border2.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!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.049 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'subject:code': 0.07; 'python.': 0.11; 'thu,': 0.15; '>in': 0.16; 'wrote:': 0.16; 'variable': 0.20; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; '-0700,': 0.29; 'tutorial': 0.29; 'work.': 0.30; 'me?': 0.34; 'subject:?': 0.34; 'received:google.com': 0.34; 'could': 0.35; 'to:addr:python-list': 0.35; 'skip:> 10': 0.35; "isn't": 0.35; 'but': 0.36; 'there': 0.36; 'should': 0.37; 'subject:: ': 0.37; 'to:addr:python.org': 0.39; 'subject:-': 0.39; 'subject:the': 0.40; 'content- disposition:inline': 0.60; 'unclear': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=KwpFG88WPnZ6Y+E37hNR1zaDhVh9XTjmgf3Wvw3bhiQ=; b=eTXCaYJS5jTXV4zwPZVzD83Vq2J4B3dyQ8tzTmTA0oMVhU99q0NVuAkvGc5/MLFeLZ zwK730lGw5Fpuk6Ut6YEVsdm9onsJWI6vK04Rkk+W2t1xekEs8wNh8+xmp4OUVvsVXb7 fC+8KSKWw4kxkf1YIIjIJ1z5SqZ3IC7mUikhIqlrE7KiUxyHui20oT/cUznDWM6oJSSw 7sN9V/QObRdeXP5PhGpUBaCkO7RVtOpgUig8apc9LRzjX1pGGMe+h8Z7oXZVM28DcdVY 6GNhRkX3RSmbL6D7pJNl3VMKqPXx6tVQxJYQALLHSoU77bS59NUlVTbM4iZG+LJIFuOi fX+g== X-Received: by 10.66.132.81 with SMTP id os17mr96622516pab.153.1435282171687; Thu, 25 Jun 2015 18:29:31 -0700 (PDT) Date: Thu, 25 Jun 2015 18:29:28 -0700 From: Atnakus Arzah To: python-list@python.org Subject: Re: Can anybody explain the '-' in a 2-D creation code? Mail-Followup-To: python-list@python.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Mailman-Approved-At: Fri, 26 Jun 2015 09:09:20 +0200 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1435302561 news.xs4all.nl 2850 [2001:888:2000:d::a6]:43744 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:93190 On Thu, Jun 25, 2015 at 06:07:30PM -0700, fl wrote: >Hi, > >I read Ned's tutorial on Python. It is very interesting. On its last >example, I cannot understand the '_' in: > > > >board=[[0]*8 for _ in range(8)] > > >I know '_' is the precious answer, but it is still unclear what it is >in the above line. Can you explain it to me? Its just a variable whose value isn't used in this specific expression, you could use 'x', 'y', or any other valid variable name there and it should work. -- Atnakus Arzah When in doubt, have a cookie!