The best way is to define a variable, like this:
a = "Printed text"
print(a)
And if you want to verify wih another string, use b = input()
and verify with tis variable.
if a == b:
print("Yes")
else:
print("No")
solved How do i define a printed text in python?