Working With the Python operator Module

In this section, you’ll learn about three of the higher-order functions that Python’s operator module makes available to you: itemgetter(), attrgetter(), and methodcaller(). You’ll learn how these allow you to work with Python collections in a range of useful ways that encourage a functional style of Python programming. Selecting Values From Multidimensional Collections With itemgetter() The first function that you’ll learn about is operator.itemgetter(). In its basic form, you pass it a single parameter that represents an index. Then itemgetter() […]

Read more

Reversing Strings in Python

When you’re using Python strings often in your code, you may face the need to work with them in reverse order. Python includes a few handy tools and techniques that can help you out in these situations. With them, you’ll be able to build reversed copies of existing strings quickly and efficiently. Knowing about these tools and techniques for reversing strings in Python will help you improve your proficiency as a Python developer. In this video course, you’ll learn how […]

Read more

How to Download Files From URLs With Python

When it comes to file retrieval, Python offers a robust set of tools and packages that are useful in a variety of applications, from web scraping to automating scripts and analyzing retrieved data. Downloading files from a URL programmatically is a useful skill to learn for various programming and data projects and workflows. In this tutorial, you’ll learn how to: Download files from the Web using the standard library as well as third-party libraries in Python Stream data to download […]

Read more

Python 3.12 Preview: More Intuitive and Consistent F-Strings

Every new Python version brings many changes, updates, fixes, and new features. Python 3.12 will be the next minor version and is now in the beta phase. In this version, the core team has been working intensely to formalize and improve the syntax and behavior of one of the most popular Python features: f-strings. F-strings, short for formatted strings, are string literals prefixed by either a lowercase or uppercase letter F. These strings provide a concise and clean syntax that […]

Read more

Socket Programming in Python Part 1: Handling Connections

Sockets and the socket API are used to send messages across a network. They provide a form of inter-process communication (IPC). The network can be a logical, local network to the computer, or one that’s physically connected to an external network, with its own connections to other networks. The obvious example is the Internet, which you connect to with your ISP. In this two-part series, you’ll create: A simple socket server and client An improved version that handles multiple connections […]

Read more

Python’s list Data Type: A Deep Dive With Examples

The list class is a fundamental built-in data type in Python. It has an impressive and useful set of features, allowing you to efficiently organize and manipulate heterogeneous data. Knowing how to use lists is a must-have skill for you as a Python developer. Lists have many use cases, so you’ll frequently reach for them in real-world coding. By working through this tutorial, you’ll dive deep into lists and get a solid understanding of their key features. This knowledge will […]

Read more

Creating Web Maps From Your Data With Python Folium

If you’re working with geospatial data in Python, then you might want to quickly visualize that data on a map. Python’s Folium library gives you access to the mapping strengths of the Leaflet JavaScript library through a Python API. It allows you to create interactive geographic visualizations that you can share as a website. You’ll build a web map that displays the ecological footprint per capita of many countries and is based on a similar map on Wikipedia. Along the […]

Read more

Python News: What’s New From June 2023

June 2023 welcomed a lot of new people and positions to the Python Software Foundation (PSF). Elections wrapped up for directors, and a new security developer in residence got to work. The organization is still looking to expand, though, and it announced a new deputy CPython developer in residence position that could go to a less seasoned programmer. Over at Pydantic, version 2 brings improved performance, while the sun went down on Python 3.7. It’s summer, so get ready for […]

Read more

Unlock IPython’s Magical Toolbox for Your Coding Journey

When you’re executing Python code, the standard Python shell that comes with your Python installation is a natural tool to use. However, as you progress in your coding journey, you might find yourself seeking more powerful functionalities than the standard REPL offers. Luckily, IPython offers an enhanced version of interactive Python that can supercharge your capabilities. Using the IPython shell is a fast way of learning Python and executing code without the need for a full-fledged integrated development environment (IDE), […]

Read more

Mazes in Python Part 2: Storing and Solving

If you’re up for a little challenge and would like to take your programming skills to the next level, then you’ve come to the right place! In this hands-on video course, you’ll practice object-oriented programming, among several other good practices, while building a cool maze solver project in Python. This is the second part in a two-part series. Throughout the series, you’re going step by step through the guided process of building a complete and working project. This includes reading […]

Read more
1 90 91 92 93 94 913