Skip to content

Category Archives: Python Programs

Given a list of dates, the task is to write a Python program to check if all the dates are consecutive in the list. Input… Read More
Given a list of numbers, the task is to write a Python program to remove all numbers with repetitive digits. Examples: Input : test_list =… Read More
Given a string and two substrings, write a Python program to extract the string between the found two substrings.  Input : test_str = “Gfg is… Read More
Given a string, the task is to write a Python program to extract date from it. Input : test_str = "gfg at 2021-01-04" Output :… Read More
Given a list of numbers, the task is to write a Python program to extract all numbers with differences of the next and previous element… Read More
Given a dictionary with list values and a list, the task is to write a Python program to check if any key has all the… Read More
Given a date, and the task is to write a Python program to create a list of range of dates with the next K dates… Read More
Given a list of numbers, the task is to write a Python program to test if all elements are maximum of K apart. Examples: Input… Read More
Given a string of characters with digits embedded in it. The task is to write a Python program to extract all the numbers that are… Read More
Given a dictionary with keys joined by a split character, the task is to write a Python program to turn the dictionary into nested and… Read More
Given a date and list of dates, the task is to write a python program to find the nearest date in the given input list… Read More
Given a date format and a string date, the task is to write a python program to check if the date is valid and matches… Read More
Given a string, the task is to write a Python program to get all possible slices for K number of slices. Input : test_str =… Read More
Given a datetime object or month number, the task is to write a Python program to get the corresponding month name from it.  Examples: Input… Read More
Given a datetime object, the task is to write a Python Program to compute the last date of datetime object Month. Examples: Input : test_date… Read More