Pular para o conteúdo principal

Questão de TI - Ciência de Dados e Inteligência Artificial — Python (Conceitos Gerais e Códigos) — IDECAN 2024

TI - Ciência de Dados e Inteligência ArtificialPython (Conceitos Gerais e Códigos)
Código
qa630840
Banca
IDECAN
Órgão
IPPLAN
Ano
2024
Cargo
APIU (IPLANFOR)
Encontrar informações indesejadas é necessário no tratamento de dados, principalmente em strings. Analise o seguinte código e assinale a alternativa que contém a saída da última linha.   import re text = "Hello, world! This is an example string with some numbers: 1234567890" clean_text = re.sub(r'\d+', ", text) print(clean_text)
  1. AHello, world! This is an example string
  2. BHello, world!
  3. CHello, world! This is an example string with some numbers: 1234567890
  4. DHello, world! This is an example string with some numbers:
Revelar gabarito e comentário

GabaritoD — Hello, world! This is an example string with some numbers:

Link permanente: /questoes/qa630840