⬅︎ Back to Case insensitive list remove call
Slim and fast but as you can see in http://www.peterbe.com/plog/case-insensitive-list-remove-call-part-iiI made some necessary improvements.
L = list('ABC') other = 'c' L = [x for x in L if x.lower() != other.lower()] # L == ['A', 'B']
Comment
Slim and fast but as you can see in
http://www.peterbe.com/plog/case-insensitive-list-remove-call-part-ii
I made some necessary improvements.
Parent comment
L = list('ABC') other = 'c' L = [x for x in L if x.lower() != other.lower()] # L == ['A', 'B']