生成列表问题
L = []
def dcs(L):
for x in L:
if str(x)[0:1] == str(x)[2:]:
return L.append(x)
print dcs(range(100, 1000))
打印结果怎么会是“None”,请大神赐教,谢谢!
L = []
def dcs(L):
for x in L:
if str(x)[0:1] == str(x)[2:]:
return L.append(x)
print dcs(range(100, 1000))
打印结果怎么会是“None”,请大神赐教,谢谢!
2017-04-27
举报