Discuss / Python / 作业

作业

Topic source

>>> L = ['Hello', 'World', 18, 'Apple', None]

>>> [s.lower() for s in L if isinstance(s,str)==True]

['hello', 'world', 'apple']

>>>


  • 1

Reply