Python: Findall Function
Posted: Tue Apr 07, 2026 5:54 pm
In this form, the findall function returns a list of instances of some phrase.
Code: Select all
import re
forum_name = str("Hosting Chatter")
instances_of_word_host_in_forum_name = re.findall("host", forum_name)
print(instances_of_word_host_in_forum_name)
# The output will be
# ['host']
# due to it occuring once.