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


Groups > comp.lang.python > #83214

Re: Help with map python 2

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.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.010
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'odd': 0.07; '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; '1),': 0.16; '>in': 0.16; 'intervening': 0.16; 'message-id:@4ax.com': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:python': 0.16; '>>>': 0.22; 'print': 0.22; 'integer': 0.24; 'url:home': 0.24; 'header:X -Complaints-To:1': 0.27; 'prints': 0.31; 'question:': 0.31; 'subject:with': 0.35; 'but': 0.35; 'sequence': 0.36; 'charset:us- ascii': 0.36; 'positive': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'negative': 0.60; 'first': 0.61; '100': 0.79; '2015': 0.84; 'repsonse': 0.84; 'received:108': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: Help with map python 2
Date Sun, 04 Jan 2015 12:32:22 -0500
Organization IISS Elusive Unicorn
References <60e62263-6cd1-48b9-acbc-f1a0b947b8c9@googlegroups.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 <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.17377.1420392749.18130.python-list@python.org> (permalink)
Lines 26
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1420392749 news.xs4all.nl 2924 [2001:888:2000:d::a6]:49712
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:83214

Show key headers only | View raw


On Sun, 4 Jan 2015 03:34:21 -0800 (PST), flebber <flebber.crue@gmail.com>
declaimed the following:

>In repsonse to this question: Write a program that prints the first 100 members of the sequence 2, -3, 4, -5, 6, -7, 8.
>
>This is my solution it works but ugly.
>
	<snip>

Let's see... a sequence of positive even integer values, interspersed with
the negative of the intervening odd integers...

>>> for i in range(50):
... 	j = 2 * (i + 1)
... 	print j, -(j + 1),
... 	
2 -3 4 -5 6 -7 8 -9 10 -11 12 -13 14 -15 16 -17 18 -19 20 -21 22 -23 24 -25
26 -27 28 -29 30 -31 32 -33 34 -35 36 -37 38 -39 40 -41 42 -43 44 -45 46
-47 48 -49 50 -51 52 -53 54 -55 56 -57 58 -59 60 -61 62 -63 64 -65 66 -67
68 -69 70 -71 72 -73 74 -75 76 -77 78 -79 80 -81 82 -83 84 -85 86 -87 88
-89 90 -91 92 -93 94 -95 96 -97 98 -99 100 -101
>>> 
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

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


Thread

Help with map python 2 flebber <flebber.crue@gmail.com> - 2015-01-04 03:34 -0800
  Re: Help with map python 2 Chris Angelico <rosuav@gmail.com> - 2015-01-04 22:47 +1100
  Re: Help with map python 2 Alec Taylor <alec.taylor6@gmail.com> - 2015-01-04 22:47 +1100
  Re: Help with map python 2 Alec Taylor <alec.taylor6@gmail.com> - 2015-01-04 22:48 +1100
  Re: Help with map python 2 Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2015-01-04 14:08 +0200
    Re: Help with map python 2 flebber <flebber.crue@gmail.com> - 2015-01-05 03:33 -0800
      Re: Help with map python 2 Terry Reedy <tjreedy@udel.edu> - 2015-01-05 18:28 -0500
        Re: Help with map python 2 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-01-06 12:30 +1100
  Re: Help with map python 2 Peter Otten <__peter__@web.de> - 2015-01-04 17:33 +0100
  Re: Help with map python 2 Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-01-04 12:32 -0500
  Re: Help with map python 2 Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-01-04 12:41 -0500
  Re: Help with map python 2 Dan Stromberg <drsalists@gmail.com> - 2015-01-04 10:06 -0800
  Re: Help with map python 2 Terry Reedy <tjreedy@udel.edu> - 2015-01-04 16:13 -0500
    Re: Help with map python 2 flebber <flebber.crue@gmail.com> - 2015-01-05 03:37 -0800
  Re: Help with map python 2 Sayth Renshaw <flebber.crue@gmail.com> - 2015-01-04 21:22 +0000

csiph-web