⬅︎ Back to Case insensitive list remove call
L = list('ABC')other = 'c'L = [x for x in L if x.lower() != other.lower()]# L == ['A', 'B']
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.
Comment
L = list('ABC')
other = 'c'
L = [x for x in L if x.lower() != other.lower()]
# L == ['A', 'B']
Replies
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.