I have two sets (although I can do lists, or whatever):
a = frozenset((\'Today\',\'I\',\'am\',\'fine\')) b = frozenset((\'hello\',\'how\',\'are\',\'you\',\'t
>>> a_, b_ = map(set, [map(str.lower, a), map(str.lower, b)]) >>> a_ & b_ set(['today'])
Or... with less maps,
>>> a_ = set(map(str.lower, a)) >>> b_ = set(map(str.lower, b)) >>> a_ & b_ set(['today'])