>>> L1 = ['Hello', 'World', 1, 'IBM', 'Apple', None] >>> L2 = [s.lower() for s in L if isinstance(s, str)] >>> L2 ['hello', 'world', 'ibm', 'apple']
Sign in to make a reply
LesLieM樂