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 elemnum:
count+=1
return count
I found that if extend[] is monotonous, like [1.1, 2.3, 3.2, 4.5,
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 elemnum:
count+=1
return count
I found that if
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 elemnum:
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:
if
On 29 Mar 2007 04:51:00 -0700, Su Y [EMAIL PROTECTED] wrote:
snip
I want find the first number in extend[] which is larger than num, so
snip
On 3/29/07, Amit Khemka [EMAIL PROTECTED] wrote:
Btw a concise way could be:
def getfirstbigger(num):
for i,x in enumerate(extend):
if
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
wrote:
def
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 elemnum:
count+=1
return count
I found that if extend[] is monotonous, like [1.1, 2.3,
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
snip
def find(num):
# check to make sure there *is* a value greater than num
if max(extend) num:
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 elemnum:
count+=1