나는 두 파이썬 파일 first.py 가지고 second.py이python에서 다른 프로그램의 main 함수 내부에서 변수를 호출하는 방법은 무엇입니까?
import first
def main():
b=getattr(first, first_variable)
#computation
처럼 보이지만 없음 속성 오류가 발생하지 오전
def main():
#some computation
first_variable=computation_result
처럼 second.py
first.py 보인다. second.py를 통해 first.py의 main() 메소드 내부에서 변수에 액세스 할 수 있습니까?