Categories
Python Examples

Python Program to Remove Duplicate Element From a List

In this example, you will learn to remove duplicate elements from a list. Example 1: Using set() list_1 = [1, […]

Categories
Python Examples

Python Program to Count the Number of Occurrence of a Character in String

In this example, you will learn to count the number of occurrences of a character in a string. Example 1: […]

Categories
Python Examples

Python Program to Compute all the Permutation of the String

In this example, you will learn to compute all the permutation of the string. Permutation is the method of selecting […]

Categories
Python Examples

Python Program to Capitalize the First Character of a String

In this example, you will learn to capitalize the first character of a string. Two strings are said to be […]

Categories
Python Examples

Python Program to Check If Two Strings are Anagram

In this example, you will learn to check if two strings are anagram. Two strings are said to be anagram […]

Categories
Python Examples

Python Program to Count the Number of Digits Present In a Number

In this example, you will learn to count the number of digits present in a number. Example 1: Count Number […]

Categories
Python Examples

Python Program to Iterate Through Two Lists in Parallel

In this example, you will learn to iterate through two lists in parallel. Example 1: Using zip (Python 3+) list_1 […]

Categories
Python Examples

Python Program to Trim Whitespace From a String

In this example, you will learn to trim whitespace from a String. Example 1: Using strip() my_string = ” Python […]

Categories
Python Examples

Python Program to Convert Two Lists Into a Dictionary

In this example, you will learn to convert two lists into a dictionary. Example 1: Using zip and dict methods […]

Categories
Python Examples

Python Program to Create a Long Multiline String

In this example, you will learn to create a long multiline string. Example 1: Using triple quotes my_string = ”’The […]