0
Is there any other way of importing all objects of a module?
Accroding to what I know is the way to do this is by: from <modulename> import * But this way is y discouraged, as it confuses variables in your code with variables in the external module. So is there any other way of importing all objects of a module
3 Respostas
+ 1
Just use import <module> and access the object you need with <module>.<object>
+ 1
You need to write math.pi
0
I have tried it already but when I do this code:
import math
print(pi)
It gives me an error: pi not defined