Python Tutorials – Learn Python from Basics to Advanced
Python is one of the most readable and widely used programming languages. These guides cover the full range: setting up your environment, writing your first scripts, working with data structures, handling files, and reaching for libraries when you need more. Each article focuses on one task and shows you how to do it correctly.
Setup & Environment
Before you write any Python, you need it installed and configured. These guides walk through installation on different systems, keeping it up to date, and making sure your terminal can find it.
Learn Python on Mimo
- How to Install Python
- How to Install Python on macOS
- How to Update Python
- How to Uninstall Python
- How to Check Python Version
- How to Add Python to PATH
- How to Add Python Pip to PATH
- How to Run a Python Script
Virtual Environments & Packages
Keeping dependencies isolated is good practice from the start. These guides cover creating and activating virtual environments, installing packages, and organizing imports across larger projects.
- How to Create Python Virtual Environment
- How to Activate a Virtual Environment in Python
- How to Install Modules in Python
- How to Import Library in Python
- How to Import Modules in a Large Python Project
- How to Create a Python Package
The Basics
The building blocks every Python script uses: output, comments, variables, string interpolation, and error handling.
- How to Print in Python
- How to Comment in Python
- How to Comment Out Multiple Lines in Python
- How to Do Multi-line Documentation in Python
- How to Define a Variable in Python
- How to Use f string in Python
- How to Throw Errors in Python
- How to Exit a Program in Python
Functions & Classes
Reusable code starts here. These guides cover defining and calling functions, working with anonymous functions, and structuring code with classes and objects.
- How to Create a Function in Python
- How to Call a Function in Python
- How to Use Lambda in Python
- How to Create a Class in Python
- How to Create an Object in Python
Control Flow
How your program decides what to do and when to stop. These guides cover conditionals, loops, iteration helpers, and exception handling.
- How to Use if else in Python
- How to Write a for Loop in Python
- How to Use a While Loop in Python
- How to Use Break in Python
- How to Use Try and Except in Python
- How to Use Enumerate in Python
Strings
Python has a rich set of string methods. These guides cover the operations you'll use most — slicing, searching, transforming, and cleaning up text.
- How to Concatenate Strings in Python
- How to Split a String in Python
- How to Reverse a String in Python
- How to Slice a String in Python
- How to Find the Length of a String in Python
- How to Compare Strings in Python
- How to Lowercase a String in Python
- How to Remove Spaces from a String in Python
- How to Remove a Character from a String in Python
- How to Replace Characters in a String in Python
- How to Remove Punctuation from a String in Python
Type Conversion
Moving data between types is something Python scripts do constantly. These guides cover the most common conversions and where they tend to go wrong.
- How to Convert String to Int in Python
- How to Convert Integer to String in Python
- How to Convert String to Float in Python
- How to Convert List to String in Python
Numbers & Math
From basic arithmetic to rounding and random numbers, these guides cover how Python handles numeric operations.
- How to Multiply in Python
- How to Divide in Python
- How to Round in Python
- How to Square a Number in Python
- How to Do Exponents in Python
- How to Get a Random Number in Python
Lists & Arrays
Lists are the most-used data structure in Python. These guides cover creating them, modifying them, querying them, and applying functions across them.
- How to Create a List in Python
- How to Sort a List in Python
- How to Reverse a List in Python
- How to Iterate Through a List in Python
- How to Find Index of Element in List in Python
- How to Get Length of List in Python
- How to Copy a List in Python
- How to Remove Duplicates from a List in Python
- How to Check if a List is Empty in Python
- How to Combine Two Lists in Python
- How to Use random.shuffle in Python
- How to Use Map in Python
- How to Create an Array in Python
Dictionaries & Sets
Dictionaries store data as key-value pairs, and sets store unique values. These guides cover creating, accessing, modifying, and iterating over both.
- How to Make a Dictionary in Python
- How to Add to a Dictionary in Python
- How to Access a Dictionary in Python
- How to Sort a Dictionary in Python
- How to Iterate Through a Dictionary in Python
- How to Check if Key Exists in Dictionary in Python
- How to Declare a Set in Python
- How to Add to a Set in Python
Files
Reading and writing files is a core Python skill. These guides cover plain text, CSV, JSON, and Excel files, plus checking for file existence and cleaning up when you're done.
- How to Create a File in Python
- How to Open a File in Python
- How to Read a File in Python
- How to Write to a File in Python
- How to Delete a File in Python
- How to Check if a File Exists in Python
- How to Read a CSV File in Python
- How to Read a JSON File in Python
- How to Read an Excel File in Python
Data & Visualization
Python's data ecosystem is one of its biggest strengths. These guides introduce the core libraries for working with tabular data and building charts.
- How to Install NumPy in Python
- How to Install Matplotlib in Python
- How to Plot in Python
- How to Use Pandas in Python
- How to Create a DataFrame in Python
Tools & Libraries
Going further with Python means reaching for specialized libraries. These guides cover web scraping, browser automation, computer vision, working with APIs, GUIs, dates, regex, and testing tools.
- How to Install Requests in Python
- How to Use API in Python
- How to Web Scrape with Python
- How to Install Selenium in Python
- How to Use Selenium in Python
- How to Install OpenCV in Python
- How to Use Regex in Python
- How to Make a GUI in Python
- How to Get the Current Date in Python
- How to Get the Current Time in Python
- How to Use Pytest
- How to Use Pylint
Join 35M+ people learning for free on Mimo
4.8 out of 5 across 1M+ reviews
Check us out on Apple AppStore, Google Play Store, and Trustpilot