Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Findall Method | Regex Tutorial
Regex Wizards (Project)

book
Findall Method

findall() is a method that returns a list containing all matches of the pattern in the given string.

Tarefa

Swipe to start coding

  1. Define a text variable with "The cat is cute. The dog is also cute.".
  2. Use the findall() method and print the results.

Solução

import re

text = "The cat is cute. The dog is also cute."
x = re.findall("cute", text)
print(x) # Output: ['cute', 'cute']

Mark tasks as Completed
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 8

Pergunte à IA

expand
ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

some-alt