我想问一下如何检索出fibo列表列表,然后检查用户的输入值是否在fibo列表中.
a , b = 1, 1
while num <= sys.maxint:
fibo == a , b = b, a+b
if num == (b +a+b):
print "It is a Fibonacci number"
break
else:
print "It is not a Fibonacci number"
break
Run Code Online (Sandbox Code Playgroud)
谢谢!
python ×1