I am trying to solve a question that requires me to define a function that takes a positive integer T as an input and outputs a string so that
int(hashlib.sha256(string.encode()).hexdigest) = < T
is qualified. However, I do not understand how Python can output a string. I have thought of generating random strings or using str() but it seems unreasonable.
How will I be able to solve this question? Thank you very much.