Introduction To Python - Notes
Introduction To Python - Notes
What Is Python?
Python is a simple, general purpose, high level, and object-oriented programming language.
Guido Van Rossum is known as the founder of Python programming and it was released in
1991. It is a free, open-source, interpreted scripting programming language.
It is used for:
web development (server-side),
software development,
Mathematics,
system scripting.
● Python is also a cross-platform compatible language.i.e, you can install and run Python
on several operating systems. Whether you have a Windows, Mac, or Linux, you can
rest assured that Python will work on all these operating systems.
● Python is also great for visualization. It provides libraries such as Matplotlib, Seaborn,
and many more for visualization purposes.
● Python is the most popular language for Machine learning and Deep Learning. Today, all
top organizations are investing in Python to implement Machine Learning in the
back-end.
● Learning a python programming language is easy. If you compare Python with any other
language, for example, Java or C++. The syntax of Python is a lot easier .
1
● Suppose we want to print “Welcome to the world of programming” on our screen. Let’s
compare the syntax for Python and Java:
Python Syntax:
Java Syntax:
class Simple{
So here we see that Python code consists of only one line, but for Java, there are multiple lines
of code just for printing a statement.
Features Of Python
2
● Easy and simple to learn and understand.
● Python enables object-oriented programming and concepts such as classes,
encapsulation, and so on.
● Python is a dynamically typed language
● It turns the code into bytecode, which can be run on any platform.
● It is an extensible programming language which means we can write and compile code
like any other programming language.
● Python is also an integrated language since it can easily be used with other
programming languages such as C, C++, Java, and others.
● Large Open Source Community: Suppose you are working on a python project and you
get stuck somewhere, you don’t have to worry because python has a huge community
for help. So, if you have any queries, you can directly seek help from millions of python
community members.
Python In Industries
3
The above graph shows following results:
While there’s a high demand for Python developers in India, the supply is really, really low.
4
With Python on your resume, you may end up with one of the following positions in a reputed
company:
5
Python 2 Vs. Python 3
The two versions of Python - Python 2 and Python 3 are the most widely used Python versions
and there are many differences between these versions which are as follows:
Python 2 Python 3
The release year of Python 2 is 2000 The release year of Python 3 is 2008
The syntax is more complex in this version The syntax is easy and simple
than in Python 3
By default, strings are saved in ASCII format By default, strings are saved in UNICODE
in version 2 of Python format in this version.
In Python 2, Print is a statement. So, the In Python 3, Print is a function. So, the syntax
syntax is print “hello” is print (“hello”).
In python 2, while using variables inside a In Python 3, the value of variables stays
for-loop, their values do change. constant.
Python 2 is not that popular after 2020 Python 3 is a more popular version of Python
compared to Python 3 and is being used for many purposes