Discuss / Python / 慢慢来,坚持写

慢慢来,坚持写

Topic source
  1 #!/usr/bin/env python3
  2 L1 = ['Hello', 'World', 18, 'Apple', None]
  3 L2 = [s.lower() for s in L1 if isinstance(s, str)]
  4 print L2
~

  • 1

Reply