Python tutorials

Quiz: Python Keywords: An Introduction

Interactive Quiz ⋅ 6 QuestionsBy Philipp Acsany Share In this quiz, you’ll test your understanding of Python Keywords. Python keywords are reserved words with specific functions and restrictions in the language. 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. The quiz contains 6 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end […]

Read more

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

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

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

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

NumPy Techniques and Practical Examples

The NumPy library is a Python library used for scientific computing. It provides you with a multidimensional array object for storing and analyzing data in a wide variety of ways. In this video course, you’ll see examples of some features NumPy provides that aren’t always highlighted in other tutorials. In this video course, you’ll learn how to: Create multidimensional arrays from data stored in files Identify and remove duplicate data from a NumPy array Use structured NumPy arrays to reconcile […]

Read more

Python for Loops: The Pythonic Way

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: For Loops in Python (Definite Iteration) Python’s for loop allows you to iterate over the items in a collection, such as lists, tuples, strings, and dictionaries. The for loop syntax declares a loop variable that takes each item from the collection in each iteration. This loop is ideal for repeatedly executing a block of […]

Read more
1 5 6 7 8 9 190