"Su Y" <[EMAIL PROTECTED]> wrote:
> I want find the first number in extend[] which is larger than num, so
> I wrote:
> def find(num):
> count=0
> for elem in extend:
> if elem count+=1
> return count
>
> I found that if extend[] is monotonous, like [1.1, 2.3, 3.2,
On 3月29日, 下午8时22分, Michael Bentley <[EMAIL PROTECTED]> wrote:
> On Mar 29, 2007, at 6:51 AM, Su Y wrote:
>
>
>
>
>
> > I want find the first number in extend[] which is larger than num, so
> > I wrote:
> > def find(num):
> > count=0
> > for elem in extend:
> > if elem >
On 3/29/07, Michael Bentley <[EMAIL PROTECTED]> wrote:
>
> On Mar 29, 2007, at 6:51 AM, Su Y wrote:
> >
> > I want find the first number in extend[] which is larger than num, so
> def find(num):
> # check to make sure there *is* a value greater than num
> if max(extend) > num:
>
On Mar 29, 2007, at 6:51 AM, Su Y wrote:
>
> I want find the first number in extend[] which is larger than num, so
> I wrote:
> def find(num):
> count=0
> for elem in extend:
> if elem count+=1
> return count
>
> I found that if extend[] is monotonous, like [1.1, 2.
"Su Y" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
On 3ÔÂ29ÈÕ, ÏÂÎç7ʱ51·Ö, "Su Y" <[EMAIL PROTECTED]> wrote:
> hi all,
> I can't understand how this code work, its behavior is really weird
> for me...
>
> I want find the first number in extend[] which is larger than num, soI
> w
> On 29 Mar 2007 04:51:00 -0700, Su Y <[EMAIL PROTECTED]> wrote:
> > I want find the first number in extend[] which is larger than num, so
> On 3/29/07, Amit Khemka <[EMAIL PROTECTED]> wrote:
> Btw a concise way could be:
> def getfirstbigger(num):
> for i,x in enumerate(extend):
> i
On 29 Mar 2007 04:51:00 -0700, Su Y <[EMAIL PROTECTED]> wrote:
> hi all,
> I can't understand how this code work, its behavior is really weird
> for me...
>
> I want find the first number in extend[] which is larger than num, so
> I wrote:
> def find(num):
> count=0
> for elem in extend:
>
On 3月29日, 下午7时51分, "Su Y" <[EMAIL PROTECTED]> wrote:
> hi all,
> I can't understand how this code work, its behavior is really weird
> for me...
>
> I want find the first number in extend[] which is larger than num, soI wrote:
>
> def find(num):
> count=0
> for elem in extend:
> if
hi all,
I can't understand how this code work, its behavior is really weird
for me...
I want find the first number in extend[] which is larger than num, so
I wrote:
def find(num):
count=0
for elem in extend:
if elem--
http://mail.python.org/mailman/listinfo/python-list