https://docs.python.org/3/library/functions.html#print Wrote:print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)Just because you are using print to "check if" doesn't change what print is doing.
Print objects to the text stream file ...
If you really feel the need to make a new variable point to print you can.
txt = "The best things in life are free!" check_if = print check_if("expensive" not in txt)
Output:True