Python tutorials

Python News Roundup: December 2024

The Python community has kept up its momentum this month, delivering a host of exciting updates. From the promising improvements to template strings in PEP 750 to the release of Python 3.14.0a2, innovation is front and center. Developers are exploring new tools like partial validation in Pydantic 2.10, while popular projects adapt to the end of life of Python 3.8. December also welcomes the return of the beloved Advent of Code, challenging programmers and problem solvers with daily puzzles. And […]

Read more

Expression vs Statement in Python: What’s the Difference?

After working with Python for a while, you’ll eventually come across two seemingly similar terms: expression and statement. When you browse the official documentation or dig through a Python-related thread on an online forum, you may get the impression that people use these terms interchangeably. That’s often true, but confusingly enough, there are cases when the expression vs statement distinction becomes important. So, what’s the difference between expressions and statements in Python? Take the Quiz: Test your knowledge with our […]

Read more

Handling or Preventing Errors in Python: LBYL vs EAFP

Dealing with errors and exceptional situations is a common requirement in programming. You can either prevent errors before they happen or handle errors after they’ve happened. In general, you’ll have two coding styles matching these strategies: look before you leap (LBYL), and easier to ask forgiveness than permission (EAFP), respectively. In this video course, you’ll dive into the questions and considerations surrounding LBYL vs EAFP in Python. By learning about Python’s LBYL and EAFP coding styles, you’ll be able to […]

Read more

Basic Input and Output in Python

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: Reading Input and Writing Output in Python For a program to be useful, it often needs to communicate with the outside world. In Python, the input() function allows you to capture user input from the keyboard, while you can use the print() function to display output to the console. These built-in functions allow for […]

Read more

Continuous Integration and Deployment for Python With GitHub Actions

Creating software is an achievement worth celebrating. But software is never static. Bugs need to be fixed, features need to be added, and security demands regular updates. In today’s landscape, with agile methodologies dominating, robust DevOps systems are crucial for managing an evolving codebase. That’s where GitHub Actions shine, empowering Python developers to automate workflows and ensure their projects adapt seamlessly to change. GitHub Actions for Python empowers developers to automate workflows efficiently. This enables teams to maintain software quality […]

Read more

Managing Dependencies With Python Poetry

When your Python project relies on external packages, you need to make sure you’re using the right version of each package. After an update, a package might not work as it did before. A dependency manager like Python Poetry helps you specify, install, and resolve external packages in your projects. This way, you can be sure that you always work with the correct dependency version on every machine. In this video course, you’ll learn how to: Create a new project […]

Read more

Speed Up Your Python Program With Concurrency

Concurrency refers to the ability of a program to manage multiple tasks at once, improving performance and responsiveness. It encompasses different models like threading, asynchronous tasks, and multiprocessing, each offering unique benefits and trade-offs. In Python, threads and asynchronous tasks facilitate concurrency on a single processor, while multiprocessing allows for true parallelism by utilizing multiple CPU cores. Understanding concurrency is crucial for optimizing programs, especially those that are I/O-bound or CPU-bound. Efficient concurrency management can significantly enhance a program’s performance […]

Read more

Quiz: NumPy Practical Examples: Useful Techniques

Interactive Quiz ⋅ 10 QuestionsBy Ian Eyre Share In this quiz, you’ll test your understanding of the techniques covered in the tutorial NumPy Practical Examples: Useful Techniques. By working through the questions, you’ll review your understanding of NumPy arrays and also expand on what you learned in the tutorial. You’ll need to do some research outside of the tutorial to answer all the questions. Embrace this challenge and let it take you on a learning journey. The quiz contains 10 […]

Read more

Quiz: Interacting With Python

Interactive Quiz ⋅ 8 QuestionsBy Martin Breuss Share In this quiz, you’ll test your understanding of the different ways you can interact with Python. By working through this quiz, you’ll revisit key concepts related to Python interaction in interactive mode using the Read-Eval-Print Loop (REPL), through Python script files, and within Integrated Development Environments (IDEs) and code editors. You’ll also test your knowledge of some other options that may be useful, such as Jupyter Notebooks. The quiz contains 8 questions […]

Read more

Quiz: Expression vs Statement in Python: What’s the Difference?

Interactive Quiz ⋅ 6 QuestionsBy Bartosz Zaczyński Share In this quiz, you’ll test your understanding of Expression vs Statement in Python: What’s the Difference? By working through this quiz, you’ll revisit the key differences between expressions and statements in Python, and how to use them effectively in your code. The quiz contains 6 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 […]

Read more
1 2 3 4 5 6 185