You might have heard about decorators in Python. Decorators are implemented using a closure. In this article, we will study closures in python. To … [Read more...] about Closures in Python
Python Bitwise Operators
There are various types of operators like arithmetic operators, comparison operators, and bitwise operators in Python. In our programs, we use these … [Read more...] about Python Bitwise Operators
Bitwise Shift Operators in Python
There are various types of operators like arithmetic operators, comparison operators, and bitwise operators in Python. In our programs, we use these … [Read more...] about Bitwise Shift Operators in Python
Python Scope
While programming in python, we have to deal with various constructs like variables, functions, modules, libraries, etc. In several instances, … [Read more...] about Python Scope
Set Comprehension in Python
In python programming, we use different data structures like lists, tuples, sets, and dictionaries. Often we create new lists, sets or dictionaries … [Read more...] about Set Comprehension in Python
How to create an iterator in Python
Iterators are used to access the elements of an iterable object in a sequential manner. We can create an iterator for any container object such as a … [Read more...] about How to create an iterator in Python
Difference between yield and return in Python
You might have used yield and return statements while programming in python. In this article, we will discuss the theoretical concepts of return and … [Read more...] about Difference between yield and return in Python
Find the mirror image of a binary tree
Unlike a Python dictionary, a list, or a set, elements of a binary tree are represented in a hierarchical manner. Having hierarchy in a binary tree … [Read more...] about Find the mirror image of a binary tree
Add an item to a dictionary in Python
A dictionary in python is a data structure that stores data in the form of key-value pairs. The key-value pairs are also called items. The key-value … [Read more...] about Add an item to a dictionary in Python
Find the Height of a Binary Tree
Just like we find the length of a list or the number of items in a python dictionary, we can find the height of a binary tree. In this article, we … [Read more...] about Find the Height of a Binary Tree