In python, input expects input from the user, not your code (which is the opposite of what you want), could you try just removing the input wrapper around your variables?
If you run the two codes, you’ll see that the first example runs, prints once, and finishes. Meanwhile, the second one prints “example”, and then won’t stop running until you provide input, and then it’ll print what you gave it on another line.