Python Forum

Full Version: importing variables from module
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello experts,
i am learning python.
my question:
i am trying to import string variables from separate module to avoid retyping the same strings in each module where they are used. (i am using Pydroid app on my phone for now, to get a grip on the language). while the program seems to recognize imported variables they stay highlighted as "undefined" which is annoying. is it just Pydroid behavior or I am doing a wrong thing? TYA.
How do you do the import?

Does the code run or do you get an error?