
Quick Contact
Python Tutorial
- What is Python?
- How to Install Python?
- Python Variables and Operators
- Python Loops
- Python Functions
- Python Files
- Python Errors and Exceptions
- Python Packages
- Python Classes and Objects
- Python Strings
- PostgreSQL Data Types
- Python Generators and Decorators
- Python Dictionary
- Python Date and Time
- Python List and Tuples
- Python Multithreading and Synchronization
- Python Modules
- What is Python bytecode?
- Python Regular Expressions
Python Panda Tutorial
- Python Pandas Tutorial
- Python Pandas Features
- Advantages and Disadvantages of Python Pandas
- Pandas Library In Python
- Pandas Series To Frame
- Python Dataframeaggregate and Assign
- Pandas Dataframe Describe
- Pandas Dataframe Mean
- Pandas Hist
- Pandas Dataframe Sum
- How to convert Pandas DataFrame to Numpy array
- Pandas Concatenation
Python Selenium
- Selenium Basics
- Selenium with Python Introduction and Installation
- Navigating links using get method Selenium Python
- Locating Single Elements in Selenium Python
- Locating Multiple elements in Selenium Python
Python Flask Tutorial
Python Django
- How to Install Django and Set Up a Virtual Environment in 6 Steps
- Django MTV Architecture
- Django Models
- Django Views
- Django Templates
- Django Template Language
- Django Project Layout
- Django Admin Interface
- Django Database
- Django URLs and URLConf
- Django Redirects
- Django Cookies and Cookies Handling
- Django Caching
- Types of Caching in Django
- Django Sessions
- Django Forms Handling & Validation
- Django Exceptions & Error-handling
- Django Forms Validation
- Django Redirects
- Django Admin Interface
- Django Bootstrap
- Ajax in Django
- Django Migrations and Database Connectivity
- Django Web Hosting and IDE
- Django Admin Customization
- What is CRUD?
- Django ORM
- Django Request-Response Cycle
- Django ORM
- Making a basic_api with DRF
- Django Logging
- Django Applications
- Difference between Flask vs Django
- Difference between Django vs PHP
Numpy
- Numpy Introduction
- NumPy– Environment Setup
- NumPy - Data Types
- NumPy–Functions
- NumPy Histogram
- numPy.where
- numpy.sort
- NumPyfloor
- Matrix in NumPy
- NumPy Arrays
- NumPy Array Functions
- Matrix Multiplication in NumPy
- NumPy Matrix Transpose
- NumPy Array Append
- NumPy empty array
- NumPy Linear Algebra
- numpy.diff()
- numpy.unique()
- numpy.dot()
- numpy.mean()
- Numpy.argsort()
- numpy.pad()
- NumPyvstack
- NumPy sum
- NumPy Normal Distribution
- NumPylogspace()
- NumPy correlation
- Why we learn and use Numpy?
Tensorflow
- Introduction To Tensorflow
- INTRODUCTION TO DEEP LEARNING
- EXPLAIN NEURAL NETWORK?
- CONVOLUTIONAL AND RECURRENT NEURAL NETWORK
- INTRODUCTION TO TENSORFLOW
- INSTALLATION OF TENSORFLOW
- TENSORBOARD VISUALIZATION
- Linear regression in tensorflow
- Word Embedding
- Difference between CNN And RNN
- Explain Keras
- Program elements in tensorflow
- Recurrent Neural Network
- Tensorflow Object Detection
- EXPLAIN MULTILAYER PERCEPTRON
- GRADIENT DESCENT OPTIMIZATION
Interview Questions & Answers
Python Modules
A python module can be represented as a python program file which includes a python code including python functions, class, or variables. In other terms, we can say that our python code file saved with the extension (.py) is treated as the module. We may have a runnable code inside the python module.
Python Modules allows us to logically organize our Python code which makes the code easier to understand and use. In Python language, a module is just a file consisting of Python code which has several in-built or user-defined functions.
Python import Statement
We can call the Python code or functions present in a file as a module by using the import statement followed by the Python file name. Following is the syntax for the import statement in Python.
import module1[, module2[,… moduleN]
Example
Creating a Python file to be used as a module.

Calling the above module and operating on the user-defined function in the current Python program is shown in the below example.

Python from…import Statement
In Python language, from…import statement lets us import only specific and not all attributes from a module into the current namespace.
It has the following syntax:
from modulename import name1[, name2[, … nameN]]
For example, if we need to import only the function addition from the above module ReturnStatement, then we use the following statement − from ReturnStatement import addition.
This statement does not import the entire module ReturnStatement into the current namespace, but it just introduces the function addition from the module ReturnStatement into the global symbol table of the importing module. This is demonstrated in the below example.

Python from…import* Statement
Using this Python statement, we can import all names or functions from a module into the current namespace.
It has the following syntax:
from modulename import *
Although, it provides an easy way to import everything from a module into the current namespace, yet this statement is used rarely.
Locating Python Modules
In Python, when we import a module, the Python interpreter searches for the module in the following sequences. First in the current directory, if that module isn’t located then Python searches each directory in the shell variable PYTHONPATH. If it fails here as well, then lastly Python checks the default path.
Search path for the module is stored in the system module sys as the sys.path variable. The sys.path variable contains the current directory, PYTHONPATH, and the installation dependent default.
The PYTHONPATH Variable:
The PYTHONPATH is an environment variable that consists of a list of directories. Below are the syntaxes of PYTHONPATH for Windows and UNIX.
PYTHONPATH from a Windows system:
set PYTHONPATH=c:\Python34\lib;
PYTHONPATH from a UNIX system:
set PYTHONPATH=/usr/local/lib/python
Python in-built functions for Modules
Following are the in-built Python functions that are used while working with modules.
Functions | Descriptions |
---|---|
dir ( ) | The dir () Python built-in function returns a sorted list of strings containing the names defined by a module. E.g. if the module name is math, then dir (math) will list down all the names present in that module. |
globals () | If Python in-built function globals () is called from within a function, then it will return all the names (as dictionary datatype) that can be accessed globally from that function. |
locals() | If Python in-built function locals () is called from within a function, then it will return all the names (as dictionary datatype) that can be accessed locally from that function. |
reload() | In Python, when we import a module into a script, the code in the top-level portion of a module is executed only once. Therefore, if we want to execute the top-level code in a module again,then we have to use the reload () function.This function imports a previously imported module again. |
Python Math Module
Python math module is represented as the most popular mathematical functions, which contains trigonometric functions, representation functions, logarithmic functions, etc. It can also describe two mathematical constants includes Pie and Euler number, etc.
Pie (n):
It is a well-known mathematical constant and defined as the ratio of circumstance to the diameter of a circle. Its value is 3.141592653589793.
Euler’s number(e):
It is represented as the base of the natural logarithmic, and its value is 2.718281828459045.
Apply now for Advanced Python Training Course