Answer the question
In order to leave comments, you need to log in
How to read the second file using Python and take a variable from it?
Everything in the header
There are 2 files bot.py and setting.py
How can setting.py read the variable from the first file?
Answer the question
In order to leave comments, you need to log in
Weather.get_weather_today(result_city)
def get_weather_today(city):
If I understood the question correctly
, var is the name of the variable
import bot
print (bot.var)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question