Dec-11-2023, 01:53 PM
Good morning,
I'm not entirely sure I understand the reason to use the asterix when importing modules, or what its significance might be, or why you would use it.
For example, I think doing something like this would import the entire module
I'm not entirely sure I understand the reason to use the asterix when importing modules, or what its significance might be, or why you would use it.
For example, I think doing something like this would import the entire module
import math x = math.pi print(x)and I think doing something like this would import the specific function from the module?
from math import pi as why x = why print(x)My question is, I don't understand the asterix when its used like this
from math import * x = pi print(x)