Discuss / Python / 练习

练习

Topic source
# -*- coding: utf-8 -*-

L1 = ['Hello', 'World', 18, 'Apple', None]

print([x.lower() for x in L1 if x and isinstance(x,str)])

  • 1

Reply