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