What is Python
What is Python
a. Parser
It uses the source code to generate an abstract syntax tree.
b. Compiler
It turns the abstract syntax tree into Python bytecode.
c. Interpreter
It executes the code line by line in a REPL (Read-Evaluate-Print-
Loop) fashion.
Python Constructs
a. Functions in Python
A function in Python is a collection of statements grouped under
a name. You can use it whenever you want to execute all those
statements at a time.
You can call it wherever you want and as many times as you want
in a program. A function may return a value.
b. Classes in Python
Python is an object-oriented language. It supports classes and
objects.
c. Modules in Python
Python module is a collection of related classes and functions.