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. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet […]
Category: Uncategorized
Running Python Scripts
One of the most important skills you need to build as a Python developer is to be able to run Python scripts and code. This is going to be the only way for you to know if your code works as you planned. It’s even the only way of knowing if your code works at […]
Python Development in Visual Studio Code (Setup Guide)
In this course, you’ll learn how to use Visual Studio Code for Python development. By following examples, you’ll cover everything from how to install and configure Visual Studio Code for Python development to how to run tests and debug application, so you can use this powerful tool. [ Improve Your Python With 🐍 Python Tricks […]
Documenting Python Projects With Sphinx and Read The Docs
In this video series we’ll cover creating Python documentation from scratch using Sphinx, as well as getting your code repository hooked up to Read The Docs, to automatically build and publish your code documentation. Note: This course uses Python 2.7 in its coding examples. Resources doctut Example Project doctut Example Docs on Read The Docs […]
Intro to Object-Oriented Programming (OOP) in Python
Object-oriented programming is one of the biggest and most important subjects in all of programming. This series will provide you with a basic conceptual understanding of Object-Oriented Programming so you can take your Python programming skills to the next level. You’ll learn how to define custom types using classes, and how to instantiate those classes […]
Python Decorators 101
In this course on Python decorators, you’ll learn what they are and how to create and use them. Decorators provide a simple syntax for calling higher-order functions in Python. By definition, a decorator is a function that takes another function and extends the behavior of the latter function without explicitly modifying it. [ Improve Your […]
Writing Comments in Python
Learn how to write Python comments that are clean, concise, and useful. Quickly get up to speed on what the best practices are, which types of comments it’s best to avoid, and how you can practice writing cleaner comments. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python […]
Introduction to Python Exceptions
A Python program terminates as soon as it encounters an error. In Python, an error can be a syntax error or an exception. In this course, you will see what an exception is and how it differs from a syntax error. After that, you will learn about raising exceptions and making assertions. Then, you’ll finish […]
Writing Beautiful Pythonic Code With PEP 8
Learn how to write high-quality, readable code by using the Python style guidelines laid out in PEP 8. Following these guidelines helps you make a great impression when sharing your work with potential employers and collaborators. This course outlines the key guidelines laid out in PEP 8. It’s aimed at beginner to intermediate programmers. [ […]
Python 3’s f-Strings: An Improved String Formatting Syntax
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 course, you’ll know how and why to start using f-strings today. [ Improve Your […]
Idiomatic Python 101
Python Idioms for people coming from other languages and how to improve your idiomatic practices with Python. We will cover things to do with string concatenation, dictionary look ups, dealing with Python scripts, encoding, and for loops. Note: This course uses Python 2.7 in its coding examples. Resources: Writing Idiomatic Python Python Guide [ Improve […]
Pythonic OOP String Conversion: __repr__ vs __str__
In this tutorial series you’ll do a deep dive on how Python’s to-string conversion using the __repr__ and __str__ “magic methods” works and how you can add implement them in your own classes and objects. When you define a custom class in Python and then try to print one of its instances to the console […]
Test-Driven Development With PyTest
In this hands-on course, you’ll see how to create Python unit tests, execute them, and find the bugs before your users do. You’ll learn about the tools available to write and execute tests, check your application’s performance, and even look for security issues. Resources TDD Project Sample Code [ Improve Your Python With 🐍 Python Tricks 💌 […]
Python Exceptions 101
Learn the proper handling of Python exceptions as well as protecting yourself from when things go wrong. You’ll also learn about how to clean up, after an exception occurs, as well as defining your own exception types when the need arises. Note: This course uses Python 2.7 in its coding examples. [ Improve Your Python […]
We’re Celebrating 1 Million Page Views per Month!
They say people come to Python for the language and stay for the community. We couldn’t agree more! You mean the world to us, and we are honored to have you as a reader! Today, we’re celebrating reaching 1,000,000 monthly page views at realpython.com. We are so thankful to you and the rest of the […]