## Python Bigram formation from given list

In this post we will discuss about bigram formation from a given list in python programming language. We will discuss two methods for creating bigrams. When we are dealing with text classification, sometimes we need to do certain kind of natural language processing and hence sometimes require to form bigrams of words for processing. In … Read more

## Convert a list of multiple integers into single integer Python

Given a list of integers, write a Python program to convert a list of multiple integers into single integer. Input : [1, 2, 3] Output: 123 Input : [55, 32, 890] Output: 5532890 There are multiple approaches possible to convert the given list into a single integer. Let’s see each one by one. Approach #1 … Read more

## Program to Solve Quadratic Equation in Python

Here we will write a program to solve quadratic equation in Python, so first lets understand how to solve a quadratic equation. The standard form of a quadratic equation is: ax 2 + bx + c = 0, where a, b and c are real numbers and a ≠ 0 The value of a, b … Read more

## Convert case of elements in a list of strings Python

Given a list of strings, write a Python program to convert case of all string from lowercase/uppercase to uppercase/lowercase. Input : [‘PrO’, ‘pROG’, ‘RAMmInG’] Output: [‘pro’, ‘prog’, ‘ramming’] Input : [‘fun’, ‘Foo’, ‘BaR’] Output: [‘FUN’, ‘FOO’, ‘BAR’] Method #1 : Convert Uppercase to Lowercase using map function out = map(lambda x:x.lower(), [ ‘PrO’, ‘pROG’, ‘RAMmInG’]) … Read more

## Method resolution order in Python Inheritance

Method Resolution Order : Method Resolution Order(MRO) it denotes the way a programming language resolves a method or attribute. Python supports classes inheriting from other classes. The class being inherited is called the Parent or Superclass, while the class that inherits is called the Child or Subclass. In python, method resolution order defines the order … Read more