Discuss / Python / 太好用了~

太好用了~

Topic source

_潴潴俠_

#1 Created at ... [Delete] [Delete and Lock User]
L = ['Hello', 'World', 18, 'Apple', None]
L2 = [s.lower() for s in  L if isinstance(s,str)]
print(L2)

  • 1

Reply