In this beginner-friendly article, you’ll learn some of the most fundamental string operations: splitting, concatenating, and joining. Not only will you learn how to use these tools, but you’ll walk away with a deeper understanding of how they work under the hood in Python. | Continue reading
In this introductory tutorial, you'll learn how to simply segment an object from an image based on color in Python using OpenCV. A popular computer vision library written in C/C++ with bindings for Python, OpenCV provides easy ways of manipulating color spaces. | Continue reading
Mahdi Yusuf is one of the founders of Pycoder’s Weekly and the CTO of Gyroscope, the OS for the human body. In this interview, we talk about the importance of focusing on the value you can offer and not just the problems you can solve. He also has a controversial opinion about Ba … | Continue reading
If you’ve worked on a Python project that has more than one file, chances are you’ve had to use an import statement before. In this tutorial, you’ll not only cover the pros and cons of absolute and relative imports but also learn about the best practices for writing import statem … | Continue reading
Get the inside scoop on the top 10 must-watch PyCon talks for both beginners and advanced Python developers. There's something for everyone in this list of informative videos! | Continue reading
Learn why and how to get started with Python's powerful logging module to meet the needs of beginners and enterprise teams alike. | Continue reading
In this step-by-step tutorial you'll learn how to work with conditional statements in Python. Master if-statements and see how to write complex decision making code in your programs. | Continue reading
Today we're celebrating reaching 1,000,000 monthly page views on realpython.com. We are so thankful to you and the rest of the Python community for helping us reach this milestone! | Continue reading
Lesser-known but idiomatic Pandas features for those already comfortable with Pandas' basic functionality and concepts. | Continue reading
Mariatta is a web developer at Zapier and volunteers much of her time to helping maintain Python as a core developer. In this interview we talk about her role as a Python core developer, as well as her love of GitHub bots and #icecreamselfies. | Continue reading
In this introductory tutorial, we'll look at what Python decorators are and how to create and use them. | Continue reading
In this tutorial you'll learn how to work effectively with Python's set data type. You'll see how to define set objects in Python and discover the operations that they support and by the end of the tutorial you'll have a good feel for when a set is an appropriate choice in your o … | Continue reading
In this detailed guide, you'll learn everything you need to know about HTTP redirects in Django. All the way from the low-level details of the HTTP protocol to the high-level way of dealing with them in Django. | Continue reading
In this Git tutorial for Python developers, we'll talk about how to address specific commits and entire ranges of commits, using the stash to save temporary work, comparing different commits, changing history, and how to clean up the mess if something doesn't work out. | Continue reading
A Python community interview with Mike Driscoll of *Mouse Vs Python* fame. As a long-time Python advocate and teacher, Mike shares his story of how he came to be a Python developer and an author. | Continue reading
In this Python dictionaries tutorial you'll cover the basic characteristics and learn how to access and manage dictionary data. Once you have finished this tutorial, you should have a good sense of when a dictionary is the appropriate data type to use, and how to do so. | Continue reading
In this in-depth tutorial you'll learn how to build a socket server and client with Python. By the end of this tutorial, you'll understand how to use the main functions and methods in Python's socket module to write your own networked client-server applications. | Continue reading
What is it about Pandas that has data scientists, analysts, and engineers raving? This is a guide to using Pandas Pythonically to get the most out of its powerful and easy-to-use built-in features. Additionally, you will learn a couple of practical time-saving tips. | Continue reading
What is it about Pandas that has data scientists, analysts, and engineers raving? This is a guide to using Pandas Pythonically to get the most out of its powerful and easy-to-use built-in features. Additionally, you will learn a couple of practical time-saving tips. | Continue reading
You'll cover the important characteristics of lists and tuples in Python 3. You'll learn how to define them and how to manipulate them. When you're finished, you should have a good feel for when and how to use these object types in a Python program. | Continue reading
Learn how to read, process, and parse CSV from text files using Python. You'll see how CSV files work, learn the all-important "csv" library built into Python, and see how CSV parsing works using the "pandas" library. | Continue reading
You'll cover a handful of different options for generating random data in Python, and then build up to a comparison of each in terms of its level of security, versatility, purpose, and speed. | Continue reading
In this tutorial you'll learn how to use Python's rich set of operators, functions, and methods for working with strings. You'll learn how to access and extract portions of strings, and also become familiar with the methods that are available to manipulate and modify string data … | Continue reading
Learn the four main approaches to string formatting in Python, as well as their strengths and weaknesses. You'll also get a simple rule of thumb for how to pick the best general purpose string formatting approach in your own programs. | Continue reading
In this tutorial, you'll be equipped to make production-quality, presentation-ready Python histogram plots with a range of choices and features. It's your one-stop shop for constructing & manipulating histograms with Python's scientific stack. | Continue reading
Python 3.7 is officially released. In this article you'll do a deep dive into some of the biggest pieces of news and new features in the latest and greatest CPython release. | Continue reading
In this article, we offer several different projects, resources, and tutorials that you can use to start building things with Python. | Continue reading
We couldn't find a good and updated list of Python developer or Python programming YouTube channels online. So we created our own list with the best and most Pythonic YouTubers. | Continue reading
In this article we take a look at three common reasons for using inner functions in Python. | Continue reading
Support Real Python and help us bring you quality Python tutorials and news by making a contribution. | Continue reading
Learn how every item of data in a Python program can be described by the abstract term object, and how to manipulate objects using symbolic names called "variables." | Continue reading
Learn the basic data types that are built into Python, like numbers, strings, and Booleans. You'll also get an overview of Python's built-in functions. | Continue reading
A reference guide to common Python application layouts and project structures for command-line applications, web applications, and more. | Continue reading
Master Python's itertools module by constructing practical examples. We'll start out simple and then gradually increase in complexity, encouraging you to "think iteratively." | Continue reading
In this Python installation guide you'll see step by step how to get a working Python 3 distribution set up on Windows, macOS, Linux, iOS, and Android. | Continue reading
Data classes are one of the new features of Python 3.7. With data classes you do not have to write boilerplate code to get proper initialization, representation and comparisons for your objects. | Continue reading
As of Python 3.6, f-strings are a great new way to format strings. Not only are they more readable, more concise, and less prone to error than other ways of formatting, but they are also faster! By the end of this article, you will learn how and why to start using f-strings today … | Continue reading
A performance comparison between pure Python, NumPy, and TensorFlow using a simple linear regression algorithm. | Continue reading
There are plenty of ways to write bad code. But in Python, one in particular reigns as king... | Continue reading
How Python's metaclasses work as an OOP concept, what they are good for—and why you might want to avoid them in your own programs. | Continue reading
In this beginner tutorial you'll learn what exceptions are good for in Python. You'll see how to raise exceptions and how to handle them with "try/except" blocks. | Continue reading