My current code searches through a list of tuples and it will print the entries that match the entered string. If it cannot find the string it will print an error. However my code prints the error even after printing the results found.
if scheme not in i:
print("Could not find a record with degree scheme",scheme)
How would i change this so it will find all the entries of the for loop, and if none are found it shows the error. Because currently it shows the entries found then also the "Could not find.." error.