Python calculate combination

How to calculate combination in Python

Python combination : Combination is the selection of set of elements from a collection, without regard to the order. For example, for the numbers 1,2,3, we can have three combinations if we select two numbers for each combination : (1,2),(1,3) and (2,3). In python, we can find out the combination Read more…

How to calculate permutation in Python

Finding permutation in python : Python provides one utility method to find out the permutation of a iterable. This method is defined in itertool package. We can import this package and find out the permutation of any iterable like a dictionary, set or list elements.   What is permutation : Read more…

What is __init__ in Python

__init__ in Python : If you know how to create python class and objects, you must have seen __init__ method before. For the first comers, this looks different than other methods and classes. In this blog post, I will explain to you what is __init__ and when/how to use it Read more…