Python Remove Characters Not Alphanumeric, sub () replaces these characters with an empty string.