Answer the question
In order to leave comments, you need to log in
How to make it possible to import from a file whose name depends on the variable?
I have created a file whose name depends on the entered variable.
How can I import other variables from it?
wrote
import {name}.py
it gives an error, it's already all twisted, but it doesn't work
Answer the question
In order to leave comments, you need to log in
first try to just create a separate variable and add the text ".py" to it
And then display
If it doesn't work, then try not to import, but upload it to the server or hosting and then through fetch (I don't remember exactly, but ReactNative has this) or something something like that, but from there to take data or something you want
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question