Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Working With Python's deque (Summary)

You’ve learned that Python’s collections module provides a data type called deque, which is specially designed for fast and memory-efficient append and pop operations on both ends. You’ve explored the deque data structure and its core features, as well as how they differ from regular Python lists. With deque, you can code your own queues and stacks at a low level in an efficient and Pythonic way.

In this video course, you’ve learned how to:

  • Create and use Python’s deque in your code
  • Efficiently append and pop items from both ends of a deque
  • Use deque to build efficient queues and stacks in Python
  • Decide when to use deque instead of list

You also coded a few practical examples that helped you approach some common use cases of deque in Python.

Resources mentioned in this lesson:

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Already a member? Sign-In

00:00 Congratulations on completing this course! You now have another powerful data structure in your Python toolkit. In this course, you’ve learned how to create and work with Python’s deque, efficiently append and remove items from both ends of a deque, build efficient queues using deque, decide when to use deque instead of list, and apply deque to a practical problem by maintaining a fixed-size page history.

00:26 Let’s look at a few resources to help you continue your Python journey. To dive deeper into queues and related data structures, check out Python Stacks, Queues, and Priority Queues in Practice, which explores different queue implementations, practical applications, and advanced queue-based systems in Python.

00:42 If you’d like to continue strengthening your Python skills, check out the Classic Data Structures and Algorithms learning path. It walks you through stacks, queues, linked lists, hash tables, and sorting algorithms, among others.

00:56 And as AI tools continue to reshape software development, the Real Python tutorial on Claude Code is a great next step to keep up with modern development workflows. It shows you how to set it up and how to use it to automate tasks, navigate codebases, and enhance your productivity as a developer.

01:15 This is Roxana from Real Python, and it’s been a pleasure guiding you through this course. Keep learning, keep building, and keep exploring Python. Thank you for watching.

01:24 Nos vemos en el próximo curso de Real Python.

Become a Member to join the conversation.