Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:Help': 0.11; 'jan': 0.12; '>on': 0.16; 'adjacent': 0.16; 'merely': 0.16; 'message-id:@4ax.com': 0.16; 'pairs': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'term.': 0.16; 'subject:python': 0.16; 'elements': 0.16; 'print': 0.22; 'integer': 0.24; 'skip': 0.24; 'url:home': 0.24; 'initial': 0.24; 'first,': 0.26; 'values': 0.27; 'header:X-Complaints-To:1': 0.27; 'operations.': 0.31; 'subject:with': 0.35; 'definition': 0.35; 'but': 0.35; 'building': 0.35; 'charset:us-ascii': 0.36; 'list': 0.37; 'easily': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'first': 0.61; 'talking': 0.65; '100': 0.79; '2015': 0.84; 'complexity': 0.84; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Help with map python 2 Date: Sun, 04 Jan 2015 12:41:18 -0500 Organization: IISS Elusive Unicorn References: <60e62263-6cd1-48b9-acbc-f1a0b947b8c9@googlegroups.com> <5vtiaah2nbfok53i2vknsv11tjt1q612aq@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-79-218-203.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 1420393285 news.xs4all.nl 2898 [2001:888:2000:d::a6]:52590 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:83215 On Sun, 04 Jan 2015 12:32:22 -0500, Dennis Lee Bieber declaimed the following: >On Sun, 4 Jan 2015 03:34:21 -0800 (PST), flebber >declaimed the following: > Talking to myself... Yes, you did ask about using map()... But I started from your initial statement: PRINT the first 100 elements in the sequence... Nothing in "print..." requires building a list of values first, and the definition for adjacent value pairs is easily generated given merely a stream of integer values with no fancy/complex set operations. Now -- if you wanted the first 99 values -- then some complexity creeps in as you'd have to skip the final -(x+1) term. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/