Getting Started

Python - IntroductionPython - Hello World ProgramPython - SyntaxPython - Data TypesPython - Variables

Operators

Python - Arithmetic OperatorsPython - Relational OperatorsPython - Logical OperatorsPython - Assignment OperatorsPython - Bitwise OperatorsPython - Membership OperatorsPython - Identity OperatorsPython - Increment and Decrement Operators

Conditions

Python - If Else statement

Loop

Python - While LoopPython - For Loop

Numbers

Python - NumbersPython - Number Conversion

Strings

Python - StringsPython - String OperatorsPython - String FormattingPython - String MethodsPython - String Format Method

List

Python - ListPython - List Methods

Tuple

Python - Tuple

Set

Python - SetPython - Set Methods

Dictionary

Python - DictionaryPython - Dictionary Methods

Functions

Python - FunctionsPython - Functions - Variable length argumentsPython - Lambda Function

Scope of Variables

Python - Scope of Variables

Modules

Python - ModulesPython - Math ModulePython - JSON ModulePython - datetime ModulePython - time Module

I/O

Python - Read input from keyboard

File

Python - File Handling

Exception Handling

Python - Exception Handling

OOP

Python - Classes and ObjectsPython - Class Constructor __init__ methodPython - Class Destructor __del__ methodPython - Built-in Class AttributesPython - InheritancePython - Method OverridingPython - Method Overloading

Package Management

Python - PIP

Python - MySQL

Python - MySQL - Getting StartedPython - MySQL - Insert dataPython - MySQL - Select dataPython - MySQL - Update dataPython - MySQL - Delete data

Python - CSV

Python - Read data from CSV filePython - Write data in CSV file

Python - Introduction

Python

Next →
python logo

This is an introduction to Python programming language.

What is Python?

Python is a high level, interpreted and object oriented programming language created by Guido van Rossum and was released back in 1991.

Use of Python

Python has many applications and some of which are listed below.

  • Developing web application (server side)
  • Software development
  • Data Science
  • AI - Artificial Intelligence
  • ML - Machine Learning
  • Game
  • Scripting

Python 2 and Python 3

Python 3 is the latest version though, version 2 is still widely used and popular.

We will be using the latest version of Python for this tutorial series which is Python 3.x.

How to install Python?

Visit python.org and download the latest version of Python as per your Operating System. This will install the required Python interpreter on your machine.

Python on Mac

For Mac users chances are that you already have Python interpreter installed on your machine. Open Terminal and type python and you will see the Python prompt >>>.

$ python
Python 2.7.10 (default, Jul 15 2017, 17:16:57) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

To come out of the interpreter type exit() and hit enter.

If you don't have Python 3 then head over to Python website and get yourself the latest version.

Python on Linux like Ubuntu

Run the python command in the terminal to check if you have it installed on your machine.

If you don't have Python installed then run the following command to install it.

$ sudo apt install python

Now run the python command and you will get the prompt.

$ python
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

To install Python 3 run the following command.

$ sudo apt install python3

Python on Windows

Head over to Python website and download the latest verion for your OS version.

IDE

For IDE (Integrated Development Environment), download PyCharm the Community edition by JetBrains. It's free and you can get it for both Mac and Windows.

Text Editor

We can also use text editor like Sublime Text, Atom, NotePad++ to write Python code. You may not get all the features of an IDE like PyCharm but it will still get the job done.

More softwares to write Python code

You can also use Eclipse and NetBeans to write Python code. You may have to install plugins to get started.

Also, check out Microsoft Visual Code. It has plugins to help you write Python code.

The .py extension

We save python code in a file having .py extension.

Example: HelloWorld.py

Alright this brings us to the end of this introduction tutorial. Head over to the next tutorial were we will learn to write our first Python program.

See you in the next tutorial. Have fun coding.

Next →

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT