Python passes the Turing test with a one-liner !

Discussion in 'Python' started by =?ISO-8859-1?Q?Morris_Carr=E9?=, Apr 1, 2004.

  1. filter(lambda W : W not in 'ILLITERATE','BULLSHIT')
     
    =?ISO-8859-1?Q?Morris_Carr=E9?=, Apr 1, 2004
    #1
    1. Advertisements

  2. =?ISO-8859-1?Q?Morris_Carr=E9?=

    Jon Perez Guest

    Morris Carré wrote:

    >
    > filter(lambda W : W not in 'ILLITERATE','BULLSHIT')
    >


    The list comprehension version:

    [p for p in 'BULLSHITTER' if p not in 'ILLITERATE']
     
    Jon Perez, Apr 2, 2004
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. A. B., Khalid
    Replies:
    5
    Views:
    503
    A. B., Khalid
    Nov 22, 2004
  2. Xah Lee
    Replies:
    0
    Views:
    482
    Xah Lee
    Oct 20, 2005
  3. +mrcakey

    Accessible Turing test

    +mrcakey, May 21, 2008, in forum: HTML
    Replies:
    17
    Views:
    828
    +mrcakey
    May 29, 2008
  4. srinivasan srinivas

    Python one-liner??

    srinivasan srinivas, Aug 21, 2008, in forum: Python
    Replies:
    2
    Views:
    435
    Paddy
    Aug 23, 2008
  5. @ Rocteur CC

    Python dos2unix one liner

    @ Rocteur CC, Feb 27, 2010, in forum: Python
    Replies:
    23
    Views:
    6,547
    Albert van der Horst
    Mar 12, 2010
  6. Raymond Hettinger

    Fun python 3.2 one-liner

    Raymond Hettinger, Mar 29, 2011, in forum: Python
    Replies:
    24
    Views:
    850
    Albert van der Horst
    Apr 14, 2011
  7. Larry
    Replies:
    1
    Views:
    237
    Martien Verbruggen
    Feb 3, 2005
  8. Xah Lee
    Replies:
    0
    Views:
    292
    Xah Lee
    Oct 20, 2005
Loading...