Python - Medium Articles
The normal sorting of tuples has been dealt previously. This article aims at sorting the given list of tuples by the second element, based on… Read More
Given a list of integers, write a Python program to find all triplets that sum up to given integer ‘k’. Examples: Input : [1, 2, 3,… Read More
numpy.random.random_integers() is one of the function for doing random sampling in numpy. It returns an array of specified shape and fills it with random integers… Read More
While developing an application or exploring some features of a language, one might need to debug the code anytime. Therefore, having an idea of debugging… Read More
Python is a multi-purpose language and widely used for scripting. We can write Python scripts to automate day-to-day things. Let’s say we want to download… Read More
Given a list of the nested dictionary, write a Python program to create a Pandas dataframe using it. We can convert list of nested dictionary… Read More
Sometimes you might need to convert a list to dict object for some better and fast operation. Let’s see how to convert a list into… Read More
Gradient Descent is an optimization technique used in Machine Learning frameworks to train different models. The training process consists of an objective function (or the… Read More
Plotting using Object Oriented(OO) API in matplotlib is an easy approach to plot graphs and other data visualization methods. The simple syntax to create the… Read More
Given a Sentence, write a Python program to convert the given sentence into a list of words.  Examples:  Input : 'Hello World' Output : ['Hello',… Read More
Given a number n, the task is to print all the numbers less than or equal to n which are perfect cubes as well as… Read More
Pandas Series is a one-dimensional labelled array capable of holding any data type (integers, strings, floating point numbers, Python objects, etc.). It has to be… Read More
Often times we want to create a list containing a continuous value like, in a range of 100-200. Let’s discuss how to create a list… Read More
The slug field within Django models is a pivotal step for improving the structure and readability of URLs in web applications. This addition allows developers… Read More
Let’s make a simple keyboard racing game using Python. In the game, the participant clicks a pair of keys in quick succession and the program… Read More
Given an integer n (in seconds), convert it into hours, minutes and seconds.  Examples: Input : 12345 Output : 3:25:45 Input : 3600 Output :… Read More
Given a dictionary, write a Python program to get the dictionary keys as a list.  Examples: Input : {1:'a', 2:'b', 3:'c'} Output : [1, 2,… Read More
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages… Read More
As we know that data comes in all shapes and sizes. They often come from various sources having different formats. We have some data present… Read More
Python list is easy to work with and also list has a lot of in-built functions to do a whole lot of operations on lists.… Read More