Deque: Add Superpowers To Your Python Lists Using This Feature

Python lists are nice, deque spice things up. let's see how.

disclaimer: that's a somewhat really complete guide on deque.

bonus: sample program at the end

What does deque stands for?

deque stands for double-ended queue

let's import only deque as we are experimenting

from collections import deque

next …

more ...

Using Python Function As Classes

In Python, you can use functions as classes. In py, everything is an object. How? I'm no py expert. Here's how we do it!

An Innocent Python Function

a function is like that

def devdotto():
    pass

and a class is like that:

class Car:
    def __init__(self):
        self.wheel = 4 …
more ...