Create interactive web maps in Python with Folium. Learn how to build and style a choropleth map by binding data to GeoJSON layers.
Posts for: #Tutorial
How to Flush the Output of the Python Print Function
In this tutorial, you’ll learn how to flush the output of Python’s print function. You’ll explore output stream buffering in Python using code examples and learn that output streams are block-buffered by default, and that print() with its default arguments executes line-buffered when interactive.
Python News Roundup: December 2024
This month brings exciting updates, including improvements to template strings in PEP 750 and the release of Python 3.14.0a2. There are new features to explore in many third-party libraries, such as Pydantic. Also, PyCon’s call for proposals deadline is near and the popular Advent of Code is back.
Asynchronous Tasks With Django and Celery
In this tutorial, you’ll learn how to integrate Celery and Django using Redis as a message broker. You’ll refactor the synchronous email sending functionality of an existing Django app into an asynchronous task that you’ll run with Celery instead.
Basic Input and Output in Python
In this tutorial, you’ll learn how to take user input from the keyboard with the input() function and display output to the console with the print() function. You’ll also use readline to improve the user experience when collecting input and to effectively format output.
Beautiful Soup: Build a Web Scraper With Python
In this tutorial, you’ll walk through the main steps of the web scraping process. You’ll learn how to write a script that uses Python’s Requests library to scrape data from a website. You’ll also use Beautiful Soup to extract the specific pieces of information you’re interested in.
How to Check if a Python String Contains a Substring
In this tutorial, you’ll learn the best way to check whether a Python string contains a substring. You’ll also learn about idiomatic ways to inspect the substring further, match substrings with conditions using regular expressions, and search for substrings in pandas.
Python Virtual Environments: A Primer
Create isolated project setups on all platforms, and gain a deep understanding of Python’s virtual environments created with the venv module.
What Does if name == “main” Do in Python?
See how Python’s if name == “main” check runs code only when the file is executed, so your imports stay clean and your scripts gain a clear entry point.
Interacting With Python
In this tutorial, you’ll explore the various ways of interacting with Python. You’ll learn about the REPL for quick testing and running scripts, as well as how to work with IDEs, Jupyter Notebooks, and online interpreters.