Ask coding questions

← Back to all posts
How would I....
ElijahNarvaez (11)

yes, its your boy back at it again to ask more stupid questions. anyway, how would i go about using the variables in also am i importing file right?

Answered by Coder100 (18904) [earned 5 cycles]
View Answer
Coder100 (18904)
  1. no you are not importing the file correctly. You are running, but remember, because you are running it, can't use the variables.

  2. You can import variables, or import them all. To import all the variables,

from coolfile import *

to import them all, but you have to reference them like: coolfile.x

import coolfile

and lastly, to import only specific ones, like the var x

from coolfile import x

i recommend using the second option.

CosmicBear (45)

To import it use import coolfile. This will run the file "" which creates the variables inside "".

EDIT: That is actually incorrect use from coolfile import variable instead.

CosmicBear (45)

also did you have the replit db on this repl because it's installing all the dependincies needed for the db.

CosmicBear (45)

and also the ones needed for flask