Python Keywords: An Introduction

Watch Now This tutorial has a related video course created by the Real Python team. Watch it together with the written tutorial to deepen your understanding: Exploring Keywords in Python Python keywords are reserved words with specific functions and restrictions in the language. Currently, Python has thirty-five keywords and four soft keywords. These keywords are always available in Python, which means you don’t need to import them. Understanding how to use them correctly is fundamental for building Python programs. By […]

Read more

ExACT: Improving AI agents’ decision-making via test-time compute scaling

Autonomous AI agents are transforming the way we approach multi-step decision-making processes, streamlining tasks like web browsing, video editing, and file management. By applying advanced machine learning, they automate workflows, optimize performance, and reduce the need for human input.  However, these systems struggle in complex, dynamic environments. A key challenge lies in balancing exploitation, using known strategies for immediate gains, with exploration, which involves  

Read more

Building a Python Command-Line To-Do App With Typer

Building an application to manage your to-do list can be an interesting project when you’re learning a new programming language or trying to take your skills to the next level. In this video course, you’ll build a functional to-do application for the command line using Python and Typer, which is a relatively young library for creating powerful command-line interface (CLI) applications in almost no time. With a project like this, you’ll apply a wide set of core programming skills while […]

Read more

Ideas: Building AI for population-scale systems with Akshay Nambi

AKSHAY NAMBI: Thanks for having me. STETKIEWICZ: I’d like to begin by asking you to tell us your origin story. How did you get started on your path? Was there a big idea or experience that captured your imagination or motivated you to do what you’re doing today? NAMBI: If I look back, my journey into research wasn’t a straight line. It was more about discovering my passion through some unexpected opportunities and also finding purpose along the way. So […]

Read more

How to Join Strings in Python

Python’s built-in string method .join() lets you combine string elements from an iterable into a single string, using a separator that you specify. You call .join() on the separator, passing the iterable of strings to join. By the end of this tutorial, you’ll understand that: You use .join() in Python to combine string elements with a specified separator. A separator is the piece of text you want inserted between each substring. To join list elements, you call .join() on a […]

Read more

Highlights from Machine Translation and Multilinguality in December 2024 and January 2025

MuLan: Adapting Multilingual Diffusion Models for Hundreds of Languages with Negligible Cost Researchers from Tsinghua, Shanghai, Beijing, Hong Kong, and Johns Hopkins have developed a method for adapting diffusion models to hundreds of languages at a minimal cost. They achieve this by swapping the text encoder with a multilingual one and training it to produce representations consistent with the CLIP encoder, leveraging parallel language data and English image-text data. The results look impressive and multilingual, and the generation quality, as […]

Read more

Quiz: How to Join Strings in Python

Interactive Quiz ⋅ 12 QuestionsBy Martin Breuss Share In this quiz, you’ll test your understanding of How to Join Strings in Python. By working through this quiz, you’ll review how to use .join() to combine strings with a specified separator and handle non-string data in iterables. You’ll also revisit how .join() compares to other concatenation methods and how it’s optimized in CPython. The quiz contains 12 questions and there is no time limit. You’ll get 1 point for each correct […]

Read more

Quiz: Python “for” Loops: The Pythonic Way

Interactive Quiz ⋅ 11 QuestionsBy Leodanis Pozo Ramos Share In this quiz, you’ll test your understanding of Python’s for loop. By working through this quiz, you’ll revisit how to iterate over items in a data collection, how to use range() for a predefined number of iterations, and how to use enumerate() for index-based iteration. The quiz contains 11 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll […]

Read more

Quiz: How to Split a String in Python

Interactive Quiz ⋅ 9 QuestionsBy Martin Breuss Share In this quiz, you’ll test your understanding of Python’s .split() method. Python’s .split() method lets you divide a string into a list of substrings based on a specified delimiter. By default, .split() separates at whitespace, including spaces, tabs, and newlines. You can customize .split() to work with specific delimiters using the sep parameter, and control the amount of splits with maxsplit. The quiz contains 9 questions and there is no time limit. […]

Read more

How to Split a String in Python

Python’s .split() method lets you divide a string into a list of substrings based on a specified delimiter. By default, .split() separates at whitespace, including spaces, tabs, and newlines. You can customize .split() to work with specific delimiters using the sep parameter, and control the amount of splits with maxsplit. By the end of this tutorial, you’ll understand that: You split a string by spaces in Python using .split() without arguments. Python’s .split() method can split on custom delimiters when […]

Read more
1 6 7 8 9 10 920