+ 4
Function of from ___ import *
Nothing special read question
4 odpowiedzi
+ 8
Basically, it just says import everything.
But even though they are fundamentally the same, there is a slight difference:
When you type import [module] you have to type the module name then function name. Otherwise, you can just type the function name. Example:
from math import *
print(sqrt(25))
#5.0
import math
print(math.sqrt(25))
#5.0
By the way, when using multiple modules it's not a good idea to put "from [module] import *" because you may have confusion amongst identically named functions in the different modules. I personally find it better to use "import [module]".
+ 4
blackcat1111 That asterisk
But Y it is even there 🙁?
Thanks
+ 3
If you're asking what this line does, it's exactly the same as
import ____
+ 3
blackcat1111 Thanks I got it now😄👍