Skip to content

Category Archives: Python Programs

Given a number in exponential format, the task is to write a Python program to convert the number from exponential format to float. The exponential… Read More
Given a string ‘s’ and char array ‘arr’, the task is to write a python program to check string s for characters in char array… Read More
Given a nested list, the task is to write a python program to flatten a nested list using recursion. Examples: Input: [[8, 9], [10, 11,… Read More
Given two text files, the task is to write a Python program to copy contents of the first file into the second file. The text… Read More
Lists: are just like dynamic sized arrays, declared in other languages (vector in C++ and ArrayList in Java). Lists need not be homogeneous always which… Read More
Given an IP address as input, the task is to write a Python program to check whether the given IP Address is Valid or not… Read More
Given a String, write a Python program to remove all the words with K length.  Examples: Input : test_str = ‘Gfg is best for all… Read More
Giving a String, write a Python program to find the maximum run of uppercase characters. Examples: Input : test_str = ‘GeEKSForGEEksISBESt’ Output : 5 Explanation : ISBES… Read More
Given the Strings list, write a Python program to increment strings that are numeric by K. Examples: Input : test_list = [“gfg”, “234”, “is”, “98”,… Read More
Given the String list, write a Python program to count pairs of reverse strings. Examples: Input : test_list = [“geeks”, “best”, “tseb”, “for”, “skeeg”] Output :… Read More
Given list of dictionaries, write a Python program to get maximum of each key. Examples: Input : test_list = [{“Gfg” : 8, “is” : 1,… Read More
Given Strings List, write a Python program to get word with most number of occurrences. Example: Input : test_list = [“gfg is best for geeks”,… Read More
Given a string, the task is to write a Python program to move all the numbers in it to its end. Examples: Input : test_str… Read More
Given a String, the task is to write a Python program to count those characters which have vowels as their neighbors. Examples: Input : test_str… Read More
Given a list, the task is to write a Python program to check whether a list contains a particular string or not. Examples: Input: l=[1,… Read More

Start Your Coding Journey Now!