So I have a file from which I import another file, in the main file I need to use a variable that is in another file and is under DEF function and IF condition. But every time I get that there is no such variable.
Code:
First file:
from modules.proxy import *
set_proxy()
browser.get("website.com")
Second file:
def set_proxy():
if proxy_type == "type1":
global browser
browser = webdriver.Chrome(CHROME_DIR)
Result: " name 'browser' is not defined "