0% found this document useful (0 votes)
4 views3 pages

What is Python

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
4 views3 pages

What is Python

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 3

What is Python?

Python is a General Purpose object-oriented programming


language, which means that it can model real-world entities. It is
also dynamically-typed because it carries out type-checking at
runtime.
It does so to make sure that the type of construct matches what we
expect it to be.

The distinctive feature of Python is that it is an interpreted


language.
Why Learn Python?
Python is the “most powerful language you can still read”,
Says Paul Dubois
Python is one of the richest Programming languages.
Python Architecture and Working
Let’s now talk about Python architecture and its usual flow –

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.

A class is an abstract data type. In other words, it is a blueprint for


an object of a certain kind. It holds no values.An object is a real-
world entity and an instance of a class.

c. Modules in Python
Python module is a collection of related classes and functions.

We have modules for mathematical calculations, string


manipulations, web programming, and many more.
d. Packages in Python
Python package is a collection of related modules. You can either
import a package or create your own.
Python has a lot of other constructs. These include control
structures, functions, exceptions, etc.

What is Python Syntax?


The Python syntax defines all the set of rules that are used to
create sentences in Python programming.

For example – We have to learn grammar to learn the English


language. In the same way, you will need to learn and understand
the Python syntax in order to learn the Python language.

You might also like