After the code runs all the way for the first time, I want it to be able to go back to the first input and allow the user to input another word.
Do I need to create a for
or while
loop around the program?
import re
import requests
search = input('What word are you looking for?: ')
first = re.compile(search)
source = input ('Enter a web page: ')
r = requests.get(source)
ar = r.text
mo = first.findall(ar)
print (mo)
print('Frequency:', len(mo))