Repository: brazilian-utils/brutils-python (python)

Issue:
Remover Símbolos de CEPs
Implementar um utilitário que recebe um CEP com símbolos (ponto e traço) e retorna esse CEP apenas com dígitos

Pull request description:
Feature: implementando a função `remove_symbols_cep`
* função e testes;
* atualização da documentação;

closes #121 

Patch:
diff --git a/README.md b/README.md
index 686d27d..b546bba 100644
--- a/README.md
+++ b/README.md
@@ -47,6 +47,7 @@ False
 - [CEP](#cep)
   - [is_valid_cep](#is_valid_cep)
   - [format_cep](#format_cep)
+  - [remove_symbols_cep](#remove_symbols_cep)
   - [generate_cep](#generate_cep)  
 
 ## CPF
@@ -80,6 +81,7 @@ Remove os símbolos de formatação do CPF e retorna somente números. Filtra ap
 >>> remove_symbols_cpf('000.111.222-33')
 '00011122233'
 ```
+
 ### generate_cpf
 
 Gera um CPF válido aleatório.
@@ -154,6 +156,16 @@ Formata o CEP. Retorna None se o CEP for inválido.
 '01310-200'
 ```
 
+### remove_symbols_cep
+
+Remove os símbolos de formatação do CEP e retorna somente números. Filtra apenas os símbolos utilizados para a validação do CEP. Propositalmente não remove outros símbolos.
+
+```python
+>>> from brutils import remove_symbols_cep
+>>> remove_symbols_cep('01310-200')
+'01310200'
+```
+
 ### generate_cep
 
 Gera um CEP válido aleatório.
diff --git a/README_EN.md b/README_EN.md
index 9d9422f..f1d5621 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -46,7 +46,8 @@ False
   - [generate_cnpj](#generate_cnpj)
 - [CEP](#cep)
   - [is_valid_cep](#is_valid_cep)
-  - [format_cep](#format_cep)   
+  - [format_cep](#format_cep)
+  - [remove_symbols_cep](#remove_symbols_cep)   
   - [generate_cep](#generate_cep)
 
 ## CPF
@@ -159,6 +160,18 @@ Format CEP. Returns None if CEP is invalid.
 '01310-200'
 ```
 
+### remove_symbols_cep
+
+Remove formatting symbols from CEP and return only digits.
+It only filters out the symbols used for CEP validation.
+It purposefully doesn't remove other symbols.
+
+```python
+>>> from brutils import remove_symbols_cep
+>>> remove_symbols_cep('01310-200')
+'01310200'
+```
+
 ### generate_cep
 
 Generate a valid random CEP.
diff --git a/brutils/__init__.py b/brutils/__init__.py
index e51068c..839548a 100644
--- a/brutils/__init__.py
+++ b/brutils/__init__.py
@@ -14,4 +14,5 @@ from brutils.cep import (
     is_valid as is_valid_cep,
     format_cep,
     generate as generate_cep,
+    remove_symbols as remove_symbols_cep,
 )
diff --git a/brutils/cep.py b/brutils/cep.py
index cd86408..ecf67a0 100644
--- a/brutils/cep.py
+++ b/brutils/cep.py
@@ -5,6 +5,16 @@ from random import randint
 ############
 
 
+def remove_symbols(dirty):  # type: (str) -> str
+    """
+    Filters out CEP formatting symbols. Symbols that are not used
+    in the CEP formatting are left unfiltered on purpose so that
+    if fails other tests, because their presence indicate that the
+    input was somehow corrupted.
+    """
+    return "".join(filter(lambda char: char not in ".-", dirty))
+
+
 def format_cep(cep):  # type: (str) -> str
     """
     Will format an adequately formatted numbers-only CEP string,


Test patch:
diff --git a/tests/test_cep.py b/tests/test_cep.py
index a2a2eca..56b12a6 100644
--- a/tests/test_cep.py
+++ b/tests/test_cep.py
@@ -13,11 +13,22 @@ from brutils.cep import (
     is_valid,
     format_cep,
     generate,
+    remove_symbols,
 )
 from unittest import TestCase, main
 
 
 class CEP(TestCase):
+    def test_remove_symbols(self):
+        assert remove_symbols("00000000") == "00000000"
+        assert remove_symbols("01310-200") == "01310200"
+        assert remove_symbols("01..310.-200.-") == "01310200"
+        assert remove_symbols("abc01310200*!*&#") == "abc01310200*!*&#"
+        assert (
+            remove_symbols("ab.c1.--.3-102.-0-.0-.*.-!*&#") == "abc1310200*!*&#"
+        )
+        assert remove_symbols("...---...") == ""
+
     def test_format_cep(self):
         with patch("brutils.cep.is_valid", return_value=True) as mock_is_valid:
             # When cep is_valid, returns formatted cep