Is there a way to write a one-liner which converts strings to lowercase and leaves numbers alone? So far I have this:
names = ["a","Abc","EFG",45,65]
newlist = [n.lower() for n in names if isinstance(n, basestring)]
print newlist
>>>['a', 'abc', 'efg']
I would like this
>>>['a', 'abc', 'efg', 45 ,65]