import os from time import sleep # try: # my_animals_file = open('other_animals.txt', 'r') # for line in my_animals_file.readlines(): # print(line.strip() ) # my_animals_file.close()yword found in text # except FileNotFoundError: # print("the file was not found") # exit() # some_new_file = open("more_animals.txt", "w") # some_new_file.write("yak, bison, \nwren") # some_new_file.close() # print('wait 3.5 seconds') # sleep(3.5) # print(os.listdir("tools")) import requests while True: data = requests.get("https://msn.com") # print(data.text) if "hacker" in data.text: print("hackers are in the news") else: print('hackers are not in the news') print('waiting 5 min...') sleep(3) print('done')