Python Programming Complete Beginner Guide
Introduction
Python is a high level programming language designed to be easy to read and write.
It is widely used in web development, automation, artificial intelligence, data science, scripting and
software development.
Python code focuses on readability and uses indentation instead of brackets. This makes it
beginner friendly.
Installing Python
Download Python from [Link] and install.
After installation run command: python --version
You can write code in IDLE, VS Code, PyCharm or Jupyter Notebook.
Variables
Variables store data values. Python automatically decides the data type.
Example:
x = 10
name = "Rahul"
price = 99.5
is_valid = True
Data Types
Main built in data types:
int, float, str, bool, list, tuple, set, dict
You can check type using type(variable)
Operators
Arithmetic: + - * / % ** //
Comparison: == != > < >= <=
Logical: and or not
Assignment: = += -= *= /=
Input Output
Taking input:
name = input("Enter name: ")
Printing output:
print("Hello", name)
Conditions
if, elif and else control program decisions.
if age >= 18:
print("Adult")
else:
print("Minor")
Loops
for loop runs fixed times.
while loop runs until condition false.
for i in range(5):
print(i)
Functions
Functions make reusable code.
def add(a,b):
return a+b
Lists
Mutable ordered collection.
nums=[1,2,3]
[Link](4)
[Link](2)
Tuples
Immutable ordered collection.
t=(1,2,3)
Dictionaries
Key value pairs.
student={"name":"Aman","age":20}
Sets
Unordered unique elements.
s={1,2,3}
String Methods
upper(), lower(), split(), replace(), strip()
File Handling
f=open("[Link]","w")
[Link]("Hello")
[Link]()
Exception Handling
try:
x=int(input())
except:
print("Invalid input")
Modules
import math
[Link](25)
Object Oriented Programming
class Student:
def __init__(self,name):
[Link]=name
Popular Libraries
NumPy for math
Pandas for data
Matplotlib for charts
TensorFlow for AI
Conclusion
Practice daily. Build small projects like calculator, todo app, password generator and automation
scripts to master Python.
Introduction
Python is a high level programming language designed to be easy to read and write.
It is widely used in web development, automation, artificial intelligence, data science, scripting and
software development.
Python code focuses on readability and uses indentation instead of brackets. This makes it
beginner friendly.
Installing Python
Download Python from [Link] and install.
After installation run command: python --version
You can write code in IDLE, VS Code, PyCharm or Jupyter Notebook.
Variables
Variables store data values. Python automatically decides the data type.
Example:
x = 10
name = "Rahul"
price = 99.5
is_valid = True
Data Types
Main built in data types:
int, float, str, bool, list, tuple, set, dict
You can check type using type(variable)
Operators
Arithmetic: + - * / % ** //
Comparison: == != > < >= <=
Logical: and or not
Assignment: = += -= *= /=
Input Output
Taking input:
name = input("Enter name: ")
Printing output:
print("Hello", name)
Conditions
if, elif and else control program decisions.
if age >= 18:
print("Adult")
else:
print("Minor")
Loops
for loop runs fixed times.
while loop runs until condition false.
for i in range(5):
print(i)
Functions
Functions make reusable code.
def add(a,b):
return a+b
Lists
Mutable ordered collection.
nums=[1,2,3]
[Link](4)
[Link](2)
Tuples
Immutable ordered collection.
t=(1,2,3)
Dictionaries
Key value pairs.
student={"name":"Aman","age":20}
Sets
Unordered unique elements.
s={1,2,3}
String Methods
upper(), lower(), split(), replace(), strip()
File Handling
f=open("[Link]","w")
[Link]("Hello")
[Link]()
Exception Handling
try:
x=int(input())
except:
print("Invalid input")
Modules
import math
[Link](25)
Object Oriented Programming
class Student:
def __init__(self,name):
[Link]=name
Popular Libraries
NumPy for math
Pandas for data
Matplotlib for charts
TensorFlow for AI
Conclusion
Practice daily. Build small projects like calculator, todo app, password generator and automation
scripts to master Python.
Introduction
Python is a high level programming language designed to be easy to read and write.
It is widely used in web development, automation, artificial intelligence, data science, scripting and
software development.
Python code focuses on readability and uses indentation instead of brackets. This makes it
beginner friendly.
Installing Python
Download Python from [Link] and install.
After installation run command: python --version
You can write code in IDLE, VS Code, PyCharm or Jupyter Notebook.
Variables
Variables store data values. Python automatically decides the data type.
Example:
x = 10
name = "Rahul"
price = 99.5
is_valid = True
Data Types
Main built in data types:
int, float, str, bool, list, tuple, set, dict
You can check type using type(variable)
Operators
Arithmetic: + - * / % ** //
Comparison: == != > < >= <=
Logical: and or not
Assignment: = += -= *= /=
Input Output
Taking input:
name = input("Enter name: ")
Printing output:
print("Hello", name)
Conditions
if, elif and else control program decisions.
if age >= 18:
print("Adult")
else:
print("Minor")
Loops
for loop runs fixed times.
while loop runs until condition false.
for i in range(5):
print(i)
Functions
Functions make reusable code.
def add(a,b):
return a+b
Lists
Mutable ordered collection.
nums=[1,2,3]
[Link](4)
[Link](2)
Tuples
Immutable ordered collection.
t=(1,2,3)
Dictionaries
Key value pairs.
student={"name":"Aman","age":20}
Sets
Unordered unique elements.
s={1,2,3}
String Methods
upper(), lower(), split(), replace(), strip()
File Handling
f=open("[Link]","w")
[Link]("Hello")
[Link]()
Exception Handling
try:
x=int(input())
except:
print("Invalid input")
Modules
import math
[Link](25)
Object Oriented Programming
class Student:
def __init__(self,name):
[Link]=name
Popular Libraries
NumPy for math
Pandas for data
Matplotlib for charts
TensorFlow for AI
Conclusion
Practice daily. Build small projects like calculator, todo app, password generator and automation
scripts to master Python.