

InterviewSolution
Saved Bookmarks
1. |
What is the use of import function in python |
Answer» If you quit from the Python interpreter and enter it again, the definitions you have made (functions and variables) are lost. Therefore, if you want to write a somewhat longer program.therefore Python has a way to put definitions in a file and use them in a script or in an interactive instance of the interpreter. Such a file is called a module; definitions from a module can be imported into other modules or into the main module (the collection of variables that you have access to in a script executed at the top level and in calculator mode) mainly in old version to form patterns u need to use import function in it. | |