Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.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.032 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.05; 'subject:code': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python.': 0.11; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.16; 'language': 0.19; 'thanks,': 0.19; 'lawrence': 0.22; 'header:In- Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'appear': 0.29; 'tutorial': 0.29; 'language.': 0.32; 'me?': 0.34; 'subject:?': 0.34; 'could': 0.35; 'to:addr:python-list': 0.35; 'attempt': 0.35; 'but': 0.36; 'hi,': 0.37; 'subject:: ': 0.37; 'received:org': 0.38; 'things': 0.39; 'to:addr:python.org': 0.39; 'subject:-': 0.39; 'mark': 0.40; 'subject:the': 0.40; 'some': 0.40; 'your': 0.60; 'research': 0.62; 'making': 0.64; 'our': 0.64; 'charset:windows-1252': 0.65; 'posing': 0.84; 'pythonistas,': 0.84; 'unclear': 0.84; 'received:2': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Can anybody explain the '-' in a 2-D creation code? Date: Fri, 26 Jun 2015 02:23:20 +0100 References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-2-98-197-151.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: 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: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1435281823 news.xs4all.nl 2860 [2001:888:2000:d::a6]:47935 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 3426 X-Received-Body-CRC: 1038939023 Xref: csiph.com comp.lang.python:93176 On 26/06/2015 02:07, 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? > > > Thanks, > Lots of people could carry on explaining things to you, but you don't appear to be making any attempt to do some research before posing your questions, so how about using a search engine? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence