I agree with everyone else here re: explicitness, but I'm going to note a corner case you might see in the wild. I would not structure your code this way, but I've seen it.
If you structure your code as:
+ mypackage/
+ my_math.py
+ foo.py
my_math.py:
import math
foo.py:
from my_math import *
if math.sin(0) == 0:
print("foo.py imported math from my_math! It was very effective!")
Then foo will not raise a NameError when run.
The reason I mention this is that you might see the following in some repos:
+ mypackage/
+ __init__.py
+ foo.py
__init__.py:
import math
foo.py:
from mypackage import *
if math.sin(0) == 0:
print("foo.py import math from mypackage implicitly, via __init__.py")
Then if foo.py is run, it will not error.
Again, do follow the majority advice here. Just import in each file. The above is just a sidenote.