Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen 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.

Aufgabe

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.

Lösung

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
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 8
We use cookies to make your experience better!
some-alt