Python tutorials

Quiz: The Walrus Operator: Python’s Assignment Expressions

Interactive Quiz ⋅ 8 QuestionsBy Geir Arne Hjelle Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of the Python Walrus Operator. This operator, used for assignment expressions, was introduced in Python 3.8 and can be used to assign values to variables as part of an expression. The quiz contains 8 questions and there is no time limit. You’ll get 1 point for each    

Read more

Quiz: Web Scraping With Scrapy and MongoDB

Interactive Quiz ⋅ 13 QuestionsBy Martin Breuss Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of Web Scraping with Scrapy and MongoDB. By working through this quiz, you’ll revisit how to set up a Scrapy project, build a functional web scraper, extract data from websites using selectors, store scraped data in a MongoDB database, and test and debug your Scrapy web scraper. The    

Read more

The Walrus Operator: Python’s Assignment Expressions

Each new version of Python adds new features to the language. Back when Python 3.8 was released, the biggest change was the addition of assignment expressions. Specifically, the := operator gave you a new syntax for assigning variables in the middle of expressions. This operator is colloquially known as the walrus operator. This tutorial is an in-depth introduction to the walrus operator. You’ll learn some of the motivations for the syntax update and explore examples where assignment expressions can be […]

Read more

Sorting Dictionaries in Python: Keys, Values, and More

You’ve got a dictionary, but you’d like to sort the key-value pairs. Perhaps you’ve tried passing a dictionary to the sorted() function but didn’t receive the results you expected. In this video course, you’ll go over everything you need to know to sort dictionaries in Python. In this video course, you’ll: Review how to use the sorted() function Learn how to get dictionary views to iterate over Understand how dictionaries are cast to lists during sorting Learn how to specify […]

Read more

Python News Roundup: August 2024

In July, there was some exciting news for the Python community as the Python core development team released versions 3.13.0b4 and 3.13.0rc1 of the language. The 3.13.0b4 release marked the end of the beta phase and paved the way for the release candidate phase. Note that 3.13.0rc1 is a pre-release, so you shouldn’t use it for production environments. However, it provides a great way to try some new and exciting language features. There’s also great some news from the Python […]

Read more

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
1 8 9 10 11 12 182