Python - Hard Articles
Given a string, with different key-value pairs separated with commas, the task is to convert that string into the dictionary. These types of problems are… Read More
Python3 # Python program to explain shutil.copy() method     # importing shutil module import shutil   # Source path source = "/home/User/Documents/file.txt"   # Destination… Read More
Morphological operations are used to extract image components that are useful in the representation and description of region shape. Morphological operations are some basic tasks… Read More
Have you ever wanted to find any particular file in a folder, but then completely freak out when you find that folder to be a… Read More
There was a time when the word “Python” meant a particularly large snake but now it is a programming language that is all the rage!!!… Read More
Given a string ‘str’ and a list of string elements, write a Python program to check whether given string can be formed by concatenating the… Read More
Given a list of lists, write a Python program to extract first element of each sublist in the given list of lists. Examples: Input :… Read More
Behold, Marvel Fans. Avengers are out there to save the Multiverse, so are we, ready to do whatever it takes to support them. In this… Read More
What is an Activation function ? In artificial neural networks, the activation function of a node defines the output of that node or neuron for a… Read More
Parsing of JSON Dataset using pandas is much more convenient. Pandas allow you to convert a list of lists into a Dataframe and specify the… Read More
Given a string, the task is to pad string up to given specific length with whitespaces. Let’s discuss few methods to solve the given task.Method… Read More
The Pandas dt.to_period() method converts the underlying data of the given Series object to PeriodArray/Index at a particular frequency. It is used to convert a… Read More
Given a Python String, the task is to check whether the String is a valid JSON object or not. Let’s try to understand the problem… Read More
Given two strings str and pattern, find the smallest substring in str containing all characters of pattern efficiently. Examples: Input : str = 'geeksforgeeks' pattern… Read More
The cyclic rotations have been discussed in the earlier articles. In Python, sometimes we just require a specific task, a part of rotation i.e. shift… Read More
Dictionary is a collection which is unordered, changeable and indexed. In Python, dictionaries are written with curly brackets, and they have keys and values. It… Read More
The normal zip function allows us the functionality to aggregate the values in a container. But sometimes, we have a requirement in which we require… Read More
In problem solving and functional programming, currying is the practice of simplifying the execution of a function that takes multiple arguments into executing sequential single-argument… Read More
In today’s world data analytics is being used by all sorts of companies out there. While working with data, we can come across any sort… Read More
Class attributes belong to the class itself and they will be shared by all the instances and hence contains same value of each instance. Such… Read More