#Yes, but make a language not a library
Writing a library might be acceptable but we definitely allow the creation of custom languages.
To achieve your goalyour goal you could make up a language called "Mython" (or whatever you want to call it) and write this compiler for it:
p = print
q = input
def runMython(code):
exec(code)
So if you wanted to run the Mython code
x = "dog"
p(q() + x)
You could just do
runMython("""
x = "dog"
p(q() + x)
""")
This is better than a library because you don't even need the import.
As always, languages are (usually) only valid in challenges that were posted after the language was invented.