Python is one of the most powerful and beginner-friendly programming languages today. If you’re looking to master Python quickly, this guide will take you through the core concepts step by step. Whether you’re learning Python for automation, web development, or data science, this one-day crash course will set you on the right track.

Hour 1: Python Basics
1. Setting Up Python
Before writing Python code, install Python and set up your environment. You can use IDLE, VS Code, or Jupyter Notebook for coding.

2. Print Statements
Python uses print() to display text:

print(“Hello, World!”)
Output:

Hello, World!
3. Variables & Data Types
Python supports multiple data types:

name = “Kemi” # String
age = 25 # Integer
height = 5.7 # Float
is_coder = True # Boolean
courses = [“Math”, “Science”, “Python”] # List
person = {“name”: “David”, “age”: 20} # Dictionary
4. User Input
user_name = input(“Enter your name: “)
print(“Hello, ” + user_name)
5. Basic Math Operations
print(5 + 3 * 2) # Output: 11
print((5 + 3) * 2) # Output: 16
print(10 % 3) # Output: 1 (Modulus)
Hour 2: Control Flow (Logic & Conditions)
1. If-Else Statements
num = int(input(“Enter a number: “))
if num % 2 == 0:
print(“Even”)
else:
print(“Odd”)
2. Loops (For & While)
For Loop:

for i in range(5):
print(“Python is awesome!”)
While Loop:

x = 5
while x > 0:
print(x)
x -= 1
3. Lists & Dictionaries
List Example:

fruits = [“Apple”, “Banana”, “Cherry”]print(fruits[1]) # Output: Banana
Dictionary Example:

student = {“name”: “David”, “age”: 20, “courses”: [“Math”, “Science”, “Python”]}
print(student[“courses”][2]) # Output: Python
Hour 3: Functions & Modules
1. Defining Functions
def greet(name):
return “Hello, ” + name

print(greet(“Kemi”))
2. Importing Modules
import math
print(math.sqrt(16)) # Output: 4.0
Hour 4: File Handling & Error Handling
1. Reading & Writing Files
with open(“sample.txt”, “w”) as file:
file.write(“Hello, Python!”)
2. Error Handling (Try-Except)
try:
num = int(input(“Enter a number: “))
print(10 / num)
except ZeroDivisionError:
print(“Cannot divide by zero!”)
except ValueError:
print(“Invalid input! Enter a number.”)
Hour 5: Introduction to Object-Oriented Programming (OOP)
1. Classes & Objects
class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def greet(self):
return f”Hello, my name is {self.name} and I am {self.age} years old.”

p1 = Person(“Kemi”, 30)
print(p1.greet())
Hour 6: Automation & Small Projects
1. Web Scraping
import requests
from bs4 import BeautifulSoup

url = “https://example.com”
response = requests.get(url)
soup = BeautifulSoup(response.text, “html.parser”)
print(soup.title.text)
2. Basic Automation with Python
Renaming Files, Sending Emails, etc.

3. Mini Projects
To-Do List: Store tasks in a list

Calculator: Perform basic math operations

Chatbot: A simple text-based chatbot

Conclusion
Congratulations! 🎉 You’ve covered the core Python concepts in just one day. Keep practicing by building small projects, automating tasks, and exploring Python libraries like Pandas, NumPy, and Flask.

Next Steps: ✅ Take on Python challenges on platforms like LeetCode, HackerRank, or CodeWars ✅ Build a real-world project (web app, data analysis, or automation script) ✅ Learn Django or Flask for web development

Want more Python training? Stay tuned for in-depth tutorials on automation, data science, and machine learning!

Categorized in: