1 00:00:00,750 --> 00:00:03,800 On different models, so let us discuss on it. 2 00:00:05,070 --> 00:00:12,830 A Python model is simply a python source file, which can expose classis functions and global vegetables, 3 00:00:13,110 --> 00:00:19,970 and when imported from another python source file, the file name is treated as a namespace. 4 00:00:20,700 --> 00:00:25,800 So a Python package is simply a directory of python models. 5 00:00:25,810 --> 00:00:27,340 So, so many models are different. 6 00:00:27,540 --> 00:00:29,630 So many libraries are different in Python. 7 00:00:29,730 --> 00:00:33,120 So that's why this python is so powerful that they are nothing. 8 00:00:33,120 --> 00:00:35,640 But these models are nothing but poorly written. 9 00:00:35,790 --> 00:00:36,870 Python source calls. 10 00:00:37,110 --> 00:00:43,680 We can import them in our current model as we are required to use those functions classes as when required 11 00:00:43,920 --> 00:00:47,240 so that we are need not to rewrite the code once again. 12 00:00:47,400 --> 00:00:54,510 So this model importing is actually enhancing the property known as reusability of the programming code 13 00:00:54,990 --> 00:00:58,140 as examples we can go for, say, import non-pay. 14 00:00:58,500 --> 00:01:02,830 Also, we can use some alias that is important vampi as it should be. 15 00:01:03,150 --> 00:01:08,100 So next time, whenever we are supposed to access any component from this non-pay so you can go for 16 00:01:08,100 --> 00:01:13,080 this non-pay dot or you can go for this N.P. dot, in this way we can also access it. 17 00:01:13,380 --> 00:01:15,420 So let us go for one practical demonstration. 18 00:01:15,420 --> 00:01:18,120 For the easier understanding of this. 19 00:01:19,050 --> 00:01:23,570 Is that how to import the different models in our python coding? 20 00:01:24,120 --> 00:01:31,380 We can import our model according to our requirement and also at the same time we can rename it that 21 00:01:31,650 --> 00:01:34,750 can create the alias of the imported model. 22 00:01:35,850 --> 00:01:44,520 So here import math model as M so next time, if I want to use this math name as a model M here instead 23 00:01:44,520 --> 00:01:46,290 of that it will be using M God. 24 00:01:46,710 --> 00:01:53,160 So print the value of pi is m dot by because we have done the renaming of it, we have done the alias 25 00:01:53,160 --> 00:02:02,300 of this math as m so underbite will print the respective by value not use of from from math import byte. 26 00:02:02,310 --> 00:02:04,740 So that is another way to import this by here. 27 00:02:05,070 --> 00:02:07,140 So from math import byte. 28 00:02:07,260 --> 00:02:10,920 So in this case there is no need to write math by here. 29 00:02:10,920 --> 00:02:15,370 You can use directly this by here in our respective print statement. 30 00:02:15,600 --> 00:02:19,500 So if I execute the code, we are getting the output like this one. 31 00:02:19,800 --> 00:02:20,910 Next one is the input. 32 00:02:20,910 --> 00:02:24,150 All names from the Standard Model met in the case. 33 00:02:24,150 --> 00:02:27,180 We can go forward from math import star. 34 00:02:27,540 --> 00:02:33,180 So all the aldosterone, all the names from the Standard Model math will get imported and later you 35 00:02:33,180 --> 00:02:35,670 can use this spy for the printing. 36 00:02:35,670 --> 00:02:37,930 That is a value of pi is by here. 37 00:02:38,310 --> 00:02:43,380 So in this way, in this particular demonstration, we have shown you that how to import models and 38 00:02:43,380 --> 00:02:50,950 how to choose from and how to use this renaming operation while importing our models. 39 00:02:51,420 --> 00:02:52,680 Thanks for watching this video.