I am currently doing miniscript that is sending documents to a specific path based on a code I enter.
The code is basic, but I get an error which I really don't understand.
When I run the following code:
en = "English"
source = eval(input("Source language?\n"))
print (source)
If I hit 'en'
I get English without any errors.
But if I run the same without input:
en = "English"
eval(en)
I get "name 'English' is not defined"
.
Basically, I want to use some of eval()
functions in my code without the input()
function. Where I am wrong?