Python’s F-String for String Interpolation and Formatting

Python f-strings provide a quick way to interpolate and format strings. They’re readable, concise, and less prone to error than traditional string interpolation and formatting tools, such as the .format() method and the modulo operator (%). An f-string is also a bit faster than those tools! By the end of this tutorial, you’ll know why f-strings are such a powerful tool that you should learn and master as a Python developer. In this tutorial, you’ll learn how to: Interpolate values, […]

Read more

Python Basics Exercises: Object-Oriented Programming

In Python Basics: Object-Oriented Programming, you learned how OOP, or object-oriented programming, is a method of structuring a program by bundling related properties and behaviors into individual objects. In this video course, you’ll practice the following: Create a class, which is like a blueprint for creating an object Use classes to create new objects Instantiate classes with attributes and methods Use dunder methods like init() and str() This video course is part of the Python Basics series, which accompanies Python […]

Read more

Build a Blog From Scratch With Django

There are plenty of blogging platforms out there that you can use out of the box. However, building your own blog from scratch with Django is a great way to keep control over your content. Even if you’re just getting started with Django, its user-friendly features will allow you to focus on designing and posting your content. In this tutorial, you’ll learn how to: Set up a new Django project Create and edit blog posts Display posts to the user […]

Read more

Highlights from Machine Translation and Multilinguality in summer 2023

Here are short summaries of the papers I liked the most during the (academic) summer. Also, this time, I am posting both on GitHub pages and on Medium. The preprint from the University of Würzburg presents a recipe for recycling existing models to create a multilingual vision-language model. They start with the English-only language model BLIP-2, which allows images to be a part of its input (the output is always textual). They take the image encoder from this model and […]

Read more

How to Sort Unicode Strings Alphabetically in Python

Sorting strings in Python is something that you can almost take for granted if you do it all the time. Yet, it can become surprisingly tricky considering all the edge cases lurking in the vast Unicode standard. Understanding Unicode isn’t an easy feat, so prepare yourself for a whirlwind tour of surprising edge cases and effective ways of dealing with them. Note: In this tutorial, you’ll often use the term Unicode string to mean any string with non-Latin letters and […]

Read more

Using Python’s min() and max()

Python’s built-in min() and max() functions come in handy when you need to find the smallest and largest values in an iterable or in a series of regular arguments. Even though these might seem like fairly basic computations, they turn out to have many interesting use cases in real-world programing. You’ll try out some of those use cases here. In this video course, you’ll learn how to: Use Python’s min() and max() to find smallest and largest values in your […]

Read more

Python News: What’s New From September 2023

As the leaves turned yellow and fall set in, the Python community prepared for the release of Python 3.12 in early October. This new version of the most popular programming language brings several exciting new features, including better error messages and improvements to static typing. It also lays the groundwork for enhanced parallelism. Microsoft Excel is about to become a friendlier space for Pythonistas with the integration of the Python Editor, opening up new possibilities for those bridging the gap […]

Read more

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

In Python, a tuple is a built-in data type that allows you to create immutable sequences of values. The values or items in a tuple can be of any type. This makes tuples pretty useful in those situations where you need to store heterogeneous data, like that in a database record, for example. Through this tutorial, you’ll dive deep into Python tuples and get a solid understanding of their key features and use cases. This knowledge will allow you to […]

Read more

What’s New in Python 3.12

It’s that time of year again, time for a new release of Python. Although Python 3.12 mostly focuses on internal improvements, there’s a little something for everyone. You can read up on all the new features by checking out the changelog. In this video course, you’ll learn about the following changes: Improvements to f-strings More did-you-mean error messages New features in the standard library Additions to static typing Changes to the CPython interpreter In this video course, you’ll explore these […]

Read more

Python 3.12: Cool New Features for You to Try

Python 3.12 was published on October 2, 2023. As usual, the new version comes out in October after lots of effort by volunteers worldwide. The new version comes with several new features and improvements that you’ll explore in this tutorial. You can also dive into the documentation to see a complete list of all changes. In this tutorial, you’ll learn about new features and improvements, like: Better error messages with helpful suggestions and guidance More expressive f-strings that are backed […]

Read more
1 81 82 83 84 85 908