Python tutorials

Web Scraping With Scrapy and MongoDB

Scrapy is a robust Python web scraping framework that can manage requests asynchronously, follow links, and parse site content. To store scraped data, you can use MongoDB, a scalable NoSQL database, that stores data in a JSON-like format. Combining Scrapy with MongoDB offers a powerful solution for web scraping projects, leveraging Scrapy’s efficiency and MongoDB’s flexible data storage. If you’re new to web scraping and you’re looking for flexible and scalable tooling, then this is the right tutorial for you. […]

Read more

Using Astropy for Astronomy With Python

This course covers two problems from introductory astronomy to help you play with some Python libraries. You’ll use Astropy, NumPy, Matplotlib, and pandas to find planet conjunctions, and graph the best viewing times for a star. In this course you’ll learn about: Astronomy concepts of conjunction and optimal viewing The Python package Astropy Using pandas to process data Building graphs with Matplotlib Python’s warning module What’s Included: Downloadable Resources:    

Read more

How to Install Python on Your System: A Guide

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: Python Basics: Setting Up Python Installing the latest version of Python on your computer could be a common requirement for you as a Python programmer. Fortunately, you’ll have a multitude of installation options. For example, you can download the official Python installer from Python.org, use your operating system’s package manager or app store, and […]

Read more

Quiz: Primer on Jinja Templating

Interactive Quiz ⋅ 5 QuestionsBy Philipp Acsany Share In this quiz, you’ll test your understanding of Jinja templating. Jinja is a powerful tool for building rich templates in Python web applications, and it can also be used to create text files with programmatic content. The quiz contains 5 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good […]

Read more

Exploring Astrophysics in Python With pandas and Matplotlib

This course uses three problems often covered in introductory astro-physics courses to play in Python. Along the way you’ll learn some astronomy, and how to use a variety of datascience libraries like NumPy, Matplotlib, pandas, and pint. In this video course you’ll learn about: Introductory astrophysics topics Working with dataframes in pandas Writing code that uses scientific units Visualizing information with Matplotlib What’s Included: Downloadable Resources:    

Read more

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
1 10 11 12 13 14 185