L = ['Hello', 'World', 18, 'Apple', None] l = [s.lower() for s in L if isinstance(s, str)] print(l)
Sign in to make a reply
平仔-C
L = ['Hello', 'World', 18, 'Apple', None] l = [s.lower() for s in L if isinstance(s, str)] print(l)