Re.findall()
re.findall() is a Python regular-expression function that returns all non-overlapping matches of a pattern in a string.
Regular Expression Puzzles and AI Coding Assistants
re.findall is a Python regular-expression function that returns all non-overlapping matches, including captured groups when the pattern contains them.
- How it is used
- Uses it to collect word, card-rank, or suit matches while assessing regex and AI suggestions.
- How deep it goes
- Explains captured-group output through repeated-rank traces, but stops short of a broad API reference.
- Examples
- Tests x-to-y words, repeated poker ranks, and suit extraction from flush hands.
- What you can do after
- Evaluate/understand it: judge whether a regex extracts the intended values and whether its tests support the claim.
Read how Regular Expression Puzzles and AI Coding Assistants explains re.findall() →
Tiny Python Projects: Learn coding and testing with puzzles and games
re.findall() is a Python regular-expression function that returns all non-overlapping matches of a pattern in a string.
- How it is used
- Finds every placeholder in Mad Libs input so the program can request replacement values.
- How deep it goes
- Explains list and tuple results, capture-group ordering, and tuple unpacking, but defers broader regular-expression implementation details.
- Examples
- Demonstrates extracting adjective, noun, and preposition placeholders from a fox-themed Mad Libs sentence.
- What you can do after
- Apply it via Python's re module to extract repeated pattern matches and process captured values.
Related concepts
- regular expressionuses · A formal pattern notation that describes sets of strings and enables text to be matched, searched, extracted, or transformed.
- tupleproduces · A tuple is a finite, ordered collection of elements treated as a single composite value or record.
- splitalternative to · Split is an operation or function that divides a string or sequence into parts according to a separator, pattern, or other rule.
- regex groupinguses · A regex capturing group is a parenthesized regular-expression subpattern whose matched text is retained for separate access or reference.
- functionused by · A function is a callable program unit that performs an operation, may accept inputs, and can produce a result or side effect.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

