The Artima Developer Community
Sponsored Link

Python Buzz Forum
any and all built-in functions in Python 2.5

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Baiju M

Posts: 225
Nickname: baijum81
Registered: Aug, 2004

Baiju M is a new user
any and all built-in functions in Python 2.5 Posted: Oct 13, 2006 9:01 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Baiju M.
Original Post: any and all built-in functions in Python 2.5
Feed Title: Programming life without Python(?)
Feed URL: http://baijum81.livejournal.com/data/rss
Feed Description: Programming life without Python(?)
Latest Python Buzz Posts
Latest Python Buzz Posts by Baiju M
Latest Posts From Programming life without Python(?)

Advertisement
Oh! this is very nice:
$ python2.5
Python 2.5 (r25:51908, Sep 27 2006, 12:21:46) 
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> any
built-in function any
>>> all
built-in function all
>>> print any.__doc__
any(iterable) -> bool

Return True if bool(x) is True for any x in the iterable.
>>> print all.__doc__
all(iterable) -> bool

Return True if bool(x) is True for all values x in the iterable.
>>> any([1,2])
True
>>> all([1,2])
True
>>> any([1,0])
True
>>> all([1,0])
False


Hey, I have made few edits here, (blame livejournal's `pre` tag), noticed it ? :)

Read: any and all built-in functions in Python 2.5

Topic: TurboGears Jam Announced Previous Topic   Next Topic Topic: Sun Comes Lately

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use