what is the difference between these two commands in python ? from pyad import * Vs import pyad | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what is the difference between these two commands in python ? from pyad import * Vs import pyad

from pyad import * Vs import pyad .....thank you in advance.

3rd Jul 2018, 10:23 AM
Raj Charan
2 Answers
+ 1
With import pyad you would have to put the pyad. prefix before accessing anything from it e.g. pyad.func() With from pyad import * you dont need to do that, this however can cause naming errors if 2 modules you use have a function with the same name
3rd Jul 2018, 10:42 AM
TurtleShell
TurtleShell - avatar
0
Thank you TurtleShell
3rd Jul 2018, 10:50 AM
Raj Charan