Python tutorials

Quiz: Asynchronous Iterators and Iterables in Python

Interactive Quiz ⋅ 10 QuestionsBy Leodanis Pozo Ramos Share Or copy the link: Copied! Happy Pythoning! Test your understanding of how to create and use Python async iterators and iterables in the context of asynchronous code. You can take this quiz after reading the Asynchronous Iterators and Iterables in Python tutorial. The quiz contains 10 questions and there is no time limit. You’ll get 1 point for each correct answer.    

Read more

Asynchronous Iterators and Iterables in Python

When you write asynchronous code in Python, you’ll likely need to create asynchronous iterators and iterables at some point. Asynchronous iterators are what Python uses to control async for loops, while asynchronous iterables are objects that you can iterate over using async for loops. Both tools allow you to iterate over awaitable objects without blocking your code. This way, you can perform different tasks asynchronously. In this tutorial, you’ll: Learn what async iterators and iterables are in Python Create async […]

Read more

Quiz: Functional Programming in Python: When and How to Use It

Interactive Quiz ⋅ 10 QuestionsBy Martin Breuss Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of Functional Programming in Python. By working through this quiz, you’ll revisit the functional programming paradigm, the concept of functions as first-class citizens in Python, the use of the lambda keyword, and how to implement functional code using map(), filter(), and reduce(). The quiz contains 10 questions and    

Read more

Interacting With REST APIs and Python

There’s an amazing amount of data available on the Web. Many web services, like YouTube and GitHub, make their data accessible to third-party applications through an application programming interface (API). One of the most popular ways to build APIs is the REST architecture style. Python provides some great tools not only to get data from REST APIs but also to build your own Python REST APIs. In this video course, you’ll learn: What REST architecture is How REST APIs provide […]

Read more

Strings and Character Data in Python

Python’s strings are ordered sequences of characters. Because of this, you can access individual characters from a string using the characters’ associated index. What’s a character’s index? Each character in a string has an index that specifies its position. Indices are integer numbers that start at 0 and go up to the number of characters in the string minus one. In the following sections, you’ll learn how to run these two operations on your Python strings. Indexing Strings You can […]

Read more

Simulate a Text File in Python

Testing applications that read files from a disk can be challenging. Issues such as machine dependencies, special access requirements, and slow performance often arise when you need to read text from a file. In this Code Conversation with instructor Martin Breuss, you’ll discover how to simplify this process by simulating text files with StringIO from the io module in Python’s standard library. In this video course, you’ll learn how to: Use io.StringIO to simulate a text file on disk Perform […]

Read more

Quiz: Python’s Built-in Exceptions: A Walkthrough With Examples

Interactive Quiz ⋅ 19 QuestionsBy Leodanis Pozo Ramos Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of the most commonly used built-in exceptions in Python. Exception handling is a core topic in Python. Knowing how to use some of the most common built-in exceptions can help you to debug your code and handle your own exceptions. Good luck! The quiz contains 19 questions    

Read more

How to Write an Installable Django App

In the Django framework, a project refers to the collection of configuration files and code for a particular website. Django groups business logic into what it calls apps, which are the modules of the Django framework. There’s plenty of documentation on how to structure your projects and the apps within them, but when it comes time to package an installable Django app, information is harder to find. In this tutorial, you’ll learn how to take an app out of a […]

Read more

Quiz: Python Basics: Lists and Tuples

Interactive Quiz ⋅ 6 QuestionsBy Martin Breuss Share Or copy the link: Copied! Happy Pythoning! In Python Basics: Lists and Tuples, you’ve met two new and important data structures: Both of these data types are sequences, meaning they are objects that contain other objects in a certain order. They each have some important distinguishing properties and come with their own set of methods for interacting with objects of each type. In this quiz, youll    

Read more

Quiz: Getting Started With Testing in Python

Interactive Quiz ⋅ 19 QuestionsBy Martin Breuss Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of testing your Python code. Testing in Python is a huge topic and can come with a lot of complexity, but it doesn’t need to be hard. You can get started creating simple tests for your application in a few easy steps and then build on it from there. With this quiz, you    

Read more
1 11 12 13 14 15 185