INDEX
INTRODUCTION
Python Overview
To install Python
What is Syntax?
Python Comments
Python Variables
Python Data Types & Operators
Data Types
Python Numbers
Data Conversion
Type Casting
Python Operators
Python Booleans
Python Strings
Python Strings
Operation on Strings
String Methods
Format Strings
Escape Characters
Python Lists
Python Lists
List Indexes
Add List Items
Remove List Items
Change List Items
List Comprehension
List Methods
Python Tuples
Python Tuples
Manipulating Tuples
Tuple index
Unpack Tuples
Python Sets
Python Sets
Add/Remove Set Items
Join Sets
Set Methods
Python Dictionaries
Python Dictionaries
1
,Full Python Tutorial
INDEX
Access Items
Add/Remove Items
Copy Dictionaries
Conditional Statements
if Statement
if-else Statement
elif Statement
Nested if Statement
Python Loops
Python for Loop
Python while Loop
Nested Loops
Control Statements
Python Functions
Python Functions
Function Arguments
return Statement
Python Recursion
Python Modules
Python Modules
Python Packages
Python OOPS
Python OOPS
self method
__init__ method
Advanced Topics
Python Iterators
JSON
Python try...except
Python PIP
Data & Time
File Handling
Python File Handling
Read/Write Files
2
,Full Python Tutorial
Python Overview
What is Python
• Python is a dynamically typed, General Purpose Programming Language that
supports an object-oriented programming approach as well as a functional
programming approach.
• Python is also an interpreted and high-level programming language.
• It was created by Guido Van Rossum in 1989.
Features of Python
• Python is simple and easy to understand.
• It is Interpreted and platform-independent which makes debugging very easy.
• Python is an open-source programming language.
• Python provides very big library support. Some of the popular libraries
include NumPy, Tensorflow, Selenium, OpenCV, etc.
• It is possible to integrate other programming languages within python.
What is Python used for
• Python is used in Data Visualization to create plots and graphical
representations.
• Python helps in Data Analytics to analyze and understand raw data for insights
and trends.
• It is used in AI and Machine Learning to simulate human behavior and to
learn from past data without hard coding.
• It is used to create web applications.
• It can be used to handle databases.
• It is used in business and accounting to perform complex mathematical
operations along with quantitative and qualitative analysis.
3
, Full Python Tutorial
To install Python,
follow the below steps:
Visit the official Python website: https://www.python.org/ Download the
executable file that matches your Operating System and version specifications.
Run the executable file and complete the installation process. After installation,
you can check the Python version by typing the following command: python --
version in the command prompt or terminal.
To start coding in Python, open a Python Integrated Development Environment
(IDE) or any text editor of your choice. For example, you can use IDLE,
PyCharm, VS Code, or Sublime Text.
To execute a simple code in Python, type the following statement in the IDE:
print("Hello universe !!!")
Save the file with a .py extension and run it. The output will be:
Hello universe !!!
To install packages in Python, you can use the pip command. For example, to
install the pandas package, type the following command in the command
prompt or terminal:
pip install pandas
In future chapters, you will learn more about the pip command and how to
install and manage Python packages.
4