Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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: UNSURE 0.235 X-Spam-Level: ** X-Spam-Evidence: '*H*': 0.71; '*S*': 0.18; 'example:': 0.03; 'subject:python': 0.11; 'subject:3.3': 0.16; 'subject:list': 0.28; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'message-id:@gmail.com': 0.36; 'positive': 0.38; 'to:addr:python.org': 0.39; 'header:Reply-to:1': 0.79; 'reply- to:addr:gmail.com': 0.79; 'header:Return-Path:2': 0.84; 'subject:Min': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:to:from:reply-to:subject:message-id:x-priority :x-mailer:mime-version:content-type; bh=GACCoXZyK+RybiDSDidAeffYtTDLRwIYHPeiNndsXPs=; b=EMiIaq8z4VFmR0d96WEl9dSedcOUYVA2T3r6jdbRHOlGtmhFeeHB/T9iTg/+WKjbAv mopdpTLqZ+wZJTIPzuL49CHD/9uM+g+zE9UZMEpHKRk4T9aWbh3rkH1sxiS8WEuX0JLd c2t3yHXdoAuzxa377ryILmEfk6nBovBCZz5ct5QgbmFRJOnRPXcOXE+CdCmCH2hnytBK uFw/x4+HxVkt7SlwRi6Ij06wGeb22YAU77J4PcJSOHioQjSjpnWKQVeV8fw7aNLkrJU2 nBmTXKuMPI2d4p8Dd0Y9PTpNLPMupsbP1fh6zGSaekpXddJKd7nujDsWWYnvh/cSTH2K 2ZUw== X-Received: by 10.50.207.39 with SMTP id lt7mr12526953igc.110.1363107790644; Tue, 12 Mar 2013 10:03:10 -0700 (PDT) Date: Tue, 12 Mar 2013 17:03:08 +0000 To: python-list@python.org From: Norah Jones Subject: Finding the Min for positive and negative in python 3.3 list X-Priority: 3 X-Mailer: CatPHPMailer 5.1 (phpmailer.sourceforge.net) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b1_7c4fc57e051efe8781e1cd9ed9a2eb2e" X-Mailman-Approved-At: Tue, 12 Mar 2013 18:33:37 +0100 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Norah Jones 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: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1363109618 news.xs4all.nl 6901 [2001:888:2000:d::a6]:59338 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41137 --b1_7c4fc57e051efe8781e1cd9ed9a2eb2e Content-Type: text/plain; charset = "iso-8859-1" Content-Transfer-Encoding: 8bit For example: a=[-15,-30,-10,1,3,5] I want to find a negative and a positive minimum. example: negative print(min(a)) = -30 positive print(min(a)) = 1 --b1_7c4fc57e051efe8781e1cd9ed9a2eb2e Content-Type: text/html; charset = "iso-8859-1" Content-Transfer-Encoding: 8bit For example:
a=[-15,-30,-10,1,3,5]

I want to find a negative and a positive minimum.

example: negative
print(min(a)) = -30

positive
print(min(a)) = 1 --b1_7c4fc57e051efe8781e1cd9ed9a2eb2e--