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.
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.