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 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

Cohesity internship interview

Here you will find details about the Cohesity internship interview experience, questions with their possible solutions are discussed here: Round 1: The first round was an online round held on Hackerearth. It had 2 questions of easy-medium level. Easliy solvable with decent coding skills. Round 2: This was a Zoom online interview round lasting for … Read more