Just to clarify, by “template” I don’t mean the prompt which you get by passing a string to the function. Instead, I wanted to have a preset string displayed and the user to fill in the blanks in said string. For example: input("Date of birth: ", template="%/%/%"), with % being where the user would type, without modifying the /s. To the user, it would look like: >Date of birth: _/ / , with the underscore being the user’s cursor. And then, as the user types, it would skip the / and go to the next % (which is just a blank space to the user). Finally, when the user presses Enter, input() would only return what the user typed, and not the rest of the template.

Now, I don’t need something with that exact syntax and behavior, I really just need a way to make the user type and replace parts of a premade string. Is that even possible? The closest thing I could find looking around the internet and Stack Overflow itself was placeholders for the input, which is almost what I need, but not quite, since the entire placeholder gets deleted when the user types.

3

No, it is not possible to do that in the terminal via input().
But if you really need something like this, you might want to use the package tkinter. With that you can create a “UI” with a input field and a (as you call it) template init.

3