In this article, we will be looking at the program to get the file name from the given file path in the python programming language.… Read More
Category Archives: Python Programs
In this article, we will see how we can access the class name of the python instances. Basic class Python3 # this is a class… Read More
Given a list of objects, the task is to write a Python program to get the object with the max attribute value in a list… Read More
Given a list, the task is to write a Python program to check if the value exists in the list or not using the lambda… Read More
Given two linked lists that represent two large positive numbers. Subtract the smaller number from the larger one and return the difference as a linked… Read More
Given a matrix and the task is to check matrix is involutory matrix or not. Involutory Matrix: A matrix is said to be involutory matrix if… Read More
Given a N * N matrix and the task is to check matrix is idempotent matrix or not.Idempotent matrix: A matrix is said to be… Read More
Given a linked list and a number n. Find the sum of the last n nodes of the linked list.Constraints: 0 <= n <= number… Read More
Given two strings s1 and s2, find if s1 is a substring of s2. If yes, return the index of the first occurrence, else return… Read More
Introduction to Identity Matrix : The dictionary definition of an Identity Matrix is a square matrix in which all the elements of the principal or… Read More
Given a linked list containing n nodes. The problem is to insert a new node with data x at the middle of the list. If… Read More
Given an array a, we have to find the minimum product possible with the subset of elements present in the array. The minimum product can… Read More
Given a singly linked list, find middle of the linked list and set middle node of the linked list at beginning of the linked list. Examples:… Read More
Given two sorted arrays of distinct elements, we need to print those elements from both arrays that are not common. The output should be printed… Read More
Given a n x n matrix. The problem is to sort the matrix row-wise and column wise.Examples: Input : mat[][] = { {4, 1, 3},… Read More


