Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #93183

Re: Can anybody explain the '-' in a 2-D creation code?

Path csiph.com!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.056
X-Spam-Evidence '*H*': 0.89; '*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; 'python.': 0.11; 'thursday,': 0.13; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.16; 'language': 0.19; 'thanks,': 0.19; '>>>': 0.20; 'lawrence': 0.22; '2015': 0.23; 'seems': 0.24; 'header:In-Reply-To:1': 0.24; 'example': 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'appear': 0.29; 'search.': 0.29; 'tutorial': 0.29; 'language.': 0.32; 'me?': 0.34; 'quickly': 0.34; 'subject:?': 0.34; 'could': 0.35; 'to:addr:python-list': 0.35; 'attempt': 0.35; 'really': 0.35; 'but': 0.36; 'thanks': 0.36; 'position.': 0.36; 'hi,': 0.37; 'subject:: ': 0.37; 'received:org': 0.38; 'stuff': 0.38; 'someone': 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; 'needing': 0.63; 'making': 0.64; 'goal': 0.64; 'our': 0.64; 'charset:windows-1252': 0.65; 'response.': 0.67; 'skill': 0.76; 'hope.': 0.84; 'posing': 0.84; 'pythonistas,': 0.84; 'unclear': 0.84; 'utc-7,': 0.84; 'received:2': 0.93; 'hand,': 0.97
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Can anybody explain the '-' in a 2-D creation code?
Date Fri, 26 Jun 2015 03:27:45 +0100
References <e90e10c2-6762-4636-9e05-1f96c7c0b2c2@googlegroups.com> <mailman.92.1435281823.3674.python-list@python.org> <88b1f3fe-2a0f-408d-8dd6-283cd26e48f8@googlegroups.com>
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 <88b1f3fe-2a0f-408d-8dd6-283cd26e48f8@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.97.1435285805.3674.python-list@python.org> (permalink)
Lines 45
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1435285805 news.xs4all.nl 2921 [2001:888:2000:d::a6]:39460
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:93183

Show key headers only | View raw


On 26/06/2015 02:40, fl wrote:
> On Thursday, June 25, 2015 at 6:24:07 PM UTC-7, Mark Lawrence wrote:
>> 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
>
> Excuse me. On one hand, I am busying on cram these Python stuff quickly for
> a position. On the other hand, the search seems to me needing a little
> skill to get the goal I hope. I would really appreciate if someone can give
> an example on what phrase to use in the search. I am not a lazy guy.
> Thanks to all the response.
>

http://stackoverflow.com/questions/5893163/what-is-the-purpose-of-the-single-underscore-variable-in-python

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Can anybody explain the '-' in a 2-D creation code? fl <rxjwg98@gmail.com> - 2015-06-25 18:07 -0700
  Re: Can anybody explain the '-' in a 2-D creation code? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-26 02:23 +0100
    Re: Can anybody explain the '-' in a 2-D creation code? fl <rxjwg98@gmail.com> - 2015-06-25 18:40 -0700
      Re: Can anybody explain the '-' in a 2-D creation code? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-26 03:27 +0100
  Re: Can anybody explain the '-' in a 2-D creation code? André Roberge <andre.roberge@gmail.com> - 2015-06-25 18:24 -0700
  Re: Can anybody explain the '-' in a 2-D creation code? Atnakus Arzah <atnakus.arzah@gmail.com> - 2015-06-25 18:29 -0700
  Re: Can anybody explain the '-' in a 2-D creation code? Gary Herron <gary.herron@islandtraining.com> - 2015-06-25 18:18 -0700

csiph-web