Let's say I had a file called random.txt containing:
Youtube
Google
Amazon
Facebook
In my Python file I have a variable with a value:
var = "Google"
What code would be needed to verify if var is in the random.txt. And print True in a new file called true.txt?
Thank you in advance for your responses.