+ 1
Its very simple ,If you want access entire module , we will use import . Eg: import math print (math.p1) # you need to call respective class name (math ) in order to use their methods. instead of that you want only a particular method means you will go for 'from'. Eg: from math import pi print(pi) # here your calling the method without the class name(math)
7th Apr 2020, 10:17 PM
Naveenkumar A
Naveenkumar A - avatar
0
it's like... from grocery bring/import notebook # then you can do whatever you want with notebook.
7th Apr 2020, 8:40 PM
minirkk
minirkk - avatar