Category: Modules

Modules

Modules(saving python code in files)

Modules(saving python code in files)

Python code typed on console for practice, other than this we can also save our code to various files. Step 1: In the following example we have created testfile.py(.py is python file extension) in...

Module Built-in Functions

Module Built-in Functions

The importation of modules has some functional support from the system. We will look at those now. __import__() The __import__() function is new as of Python 1.5, and it is the function that actually...

Importing Modules

Importing Modules

Importing a module requires the use of the import statement, whose syntax is: import module1[, module2[, …moduleN]] When this statement is encountered by the interpreter, the module is imported if found in the search...

What are Modules?

What are Modules?

A module allows you to logically organize your Python code. When code gets to be large enough, the tendency is to break it up into organized pieces which can still interact with each other...