不加[ ] 为什么不行
def toUppers(L):
return x.upper() for x in L if isinstance(x,str)
print toUppers(['Hello', 'world', 101])
不加[ ] 为什么不行
def toUppers(L):
return x.upper() for x in L if isinstance(x,str)
print toUppers(['Hello', 'world', 101])
不加[ ] 为什么不行
2018-06-26
举报