Answer the question
In order to leave comments, you need to log in
How to determine file attributes - not magic methods?
Greetings.
There is a file. The file has attributes/variables:
# file.py
a = 10
b = 20
import file as file_data
a
b
vars = []
for item in file_data.__dir__():
if '__' not in item:
vars.append(item)
Answer the question
In order to leave comments, you need to log in
What prevents you from directly passing the values of these variables to the file handler?
from file import a, b
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question