in addition to the match functionthe re module provides couple other useful functionssearchand findall the search function finds the first instance of matching patternrelaxing the restriction that the pattern start at the first letter of the string note that you can get similar effect by using match and putting character at the front of the pattern to match any characters between the start of the string and the pattern you are looking for the findall function behaves similarly to searchexcept that it finds all non-overlapping instances of the matching patternnot just the first one basicallyit finds the first matchthen it resets the search to the end of that matching string and finds the next one instead of returning list of match objectsas you would expectit returns list of matching strings or tuples sometimes it' stringssometimes it' tuples it' not very good api at allas with all bad apisyou'll have to memorize the differences and not rely on intuition the type of the return value depends on the number of bracketed groups inside the regular expressionif there are no groups in the patternre findall will return list of stringswhere each value is complete substring from the source string that matches the pattern if there is exactly one group in the patternre findall will return list of strings where each value is the contents of that group if there are multiple groups in the patternthen re findall will return list of tuples where each tuple contains value from matching groupin order when you are designing function calls in your own python librariestry to make the function always return consistent data structure it is often good to design functions that can take arbitrary inputs and process thembut the return value should not switch from single value to listor list of values to list of tuples depending on the input let re findall be lessonthe examples in the following interactive session will hopefully clarify the differencesimport re re findall(' ''abacadefagah'['ab''ac''ad''ag''ah're findall(' )''abacadefagah'[' '' '' '' '' 're findall('( ))''abacadefagah'