Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.090 X-Spam-Evidence: '*H*': 0.82; '*S*': 0.00; 'that?': 0.05; 'cc:addr :python-list': 0.10; 'subject:between': 0.16; 'wrote:': 0.16; 'thanks,': 0.19; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'message- id:@mail.gmail.com': 0.28; 'subject:list': 0.28; 'function:': 0.29; 'invoke': 0.29; 'function': 0.30; 'url:mailman': 0.31; 'url:python': 0.33; 'subject:?': 0.34; 'received:google.com': 0.34; 'url:listinfo': 0.35; 'could': 0.35; 'list': 0.35; 'but': 0.36; 'url:org': 0.36; 'list,': 0.36; 'hi,': 0.37; 'subject:: ': 0.37; 'list.': 0.37; 'difference': 0.38; 'tue,': 0.38; 'pm,': 0.39; 'subject:the': 0.40; 'between': 0.65; 'results': 0.66; 'to:none': 0.90; 'joel': 0.91; 'interesting,': 0.93 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:cc :content-type; bh=8SFWbLUmbLGb3zLvVcy5QoSSjYnSDHuQ5y7VJblwUpU=; b=Ul73GWvhOUsBjdJo+SCPeUhyk1nCsVBZZLPgUYAOLTX1XV1HaT1LzuzJddUUvZRR/+ hZMrdRzQAPWkb5LidbyH81G3wqTj58PfzLful7g13H0uLItkq0JcL3Ha4L/4hOrGOFTA bghgANlWhhpzKKQC+F0rNmSi3tovZwdm0Ls3hdoQYssVYNnCUdoFquang7eRz+KVakzr Lu6NZ7F4FEW78PI4krrdAfJA8wjcs19KwC5p0EM6sQYNCqLJ8OvxbwhXxPFJj/OwlmOs 5sEwQV9k6VHqzA3YMnv+AFYBOvGdjzEFpO+z3ziEwQFydTJ+LvIDAv9sFkVvUMqz6wid AA0g== MIME-Version: 1.0 X-Received: by 10.107.129.78 with SMTP id c75mr35995107iod.4.1433281100017; Tue, 02 Jun 2015 14:38:20 -0700 (PDT) In-Reply-To: <3ada3275-68c9-421c-aa19-53c312c42b1f@googlegroups.com> References: <3ada3275-68c9-421c-aa19-53c312c42b1f@googlegroups.com> Date: Tue, 2 Jun 2015 17:38:19 -0400 Subject: Re: What is the difference between list() and list? From: Joel Goldstick Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 42 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433281108 news.xs4all.nl 2928 [2001:888:2000:d::a6]:50212 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91901 On Tue, Jun 2, 2015 at 5:33 PM, fl wrote: > Hi, > > I find the following results are interesting, but I don't know the difference > between list() and list. > > > > > > >>>> nums=list() >>>> nums > [] >>>> xx=list >>>> xx > >>>> nums > [] >>>> print(xx) > >>>> print(nums) > [] >>>> > > > > Could you tell me that? list is the name of a built-in function that returns a list object when you set xx = list, you are giving that function a new name -- 'xx' when you invoke the function: xx() or list() it returns a list > > Thanks, > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com