![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archiveRe: Python "member of" function
From: Erik Max Francis <max@alcyone.com>
Date: Sat Apr 29 2006 - 12:38:11 CEST
brianlum@gmail.com wrote:
> I was wondering if anyone knew of a built in Python function that will
Yes, `in` is the relevant operator. It's quite simple to use:
>>> a = [1, 4, 9, 16, 25]
If you're having problems using it in some circumstance, you'll have to
-- Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis No man quite believes in any other man. -- H.L. MenckenReceived on Mon May 1 00:43:10 2006 |