Python String casefold() The casefold() method removes all case distinctions present in a string . It is used for caseless matching, i.e. ignores cases when comparing. For example, the German lowercase letter ß is equivalent to ss . However, since ß is already lowercase, the lower() method does nothing to it.