2013-03-22 2 views

답변

0

다음 코드는 문제를 해결한다 :

from __future__ import print_function #needed python 2.7 only 


import random 
example_expression = lambda: random.random() 

a = [0] 
b = [-1] 

[ print(a[0]) 
    for i in iter(int,1) #causes an infinite loop 
    if not a.__setitem__(0,example_expression()) #__setitem__ will return None 
    and a[0]>b[0] 
    and not b.__setitem__(0,a[0]) ] 
+1

당신은 – mgilson

+1

'example_expression()'해야'some_expression을()'요리! :) –

+0

덕분에, 고정이 하나까지 꽤 빨리 ;-P – d33tah