I am trying to print the word found in the list from a website response, else if not found print "Not Found". However my script prints the word it found. But it also prints "Not Found" for every item in the list. I just need it to print "Not Found" if nothing from the list found.
My Script:
response = requests.post(URL, headers=Headers, cookies=Cookies, data=Data)
content = response.content
status_type = [b'Approved', b'Pending', b'Rejected', b'Issued']
for status in status_type:
if status in content:
print(status.decode())
if status not in content:
print("Not Found")