I’d avoid `exec()` unless you’re doing something super specific. It’s not very safe and can make your code harder to debug.
Instead, try importing the file as a module. It’s cleaner and easier to manage.
```python
import your_script
your_script.main()
```
If you need to run the script dynamically, `importlib` is a great option.
Instead, try importing the file as a module. It’s cleaner and easier to manage.
```python
import your_script
your_script.main()
```
If you need to run the script dynamically, `importlib` is a great option.
