Python Programs on Strings
Python Program to Check if a String is a Pangram or Not
Python Program to Remove Odd Indexed Characters in a string
Python Program to Remove the nth Index Character from a Non-Empty String
Python Program to Replace All Occurrences of ‘a’ with $ in a String
Python Program to Replace Every Blank Space with Hyphen in a String
Python Program to Reverse a String using Recursion
Python Program to Reverse a String Without using Recursion
Python Program to Determine How Many Times a Given Letter Occurs in a String
Recursively
Python Program to Find the Length of a String without Library Function
Python Program to Count the Number of Words and Characters in a String
Python Program to Count Number of Lowercase Characters in a String
Python Program to Count the Number of Vowels in a String
Python Program to Count Number of Uppercase and Lowercase Letters in a String
Python Program to Count the Number of Digits and Letters in a String
Python Program to Print All Permutations of a String in Lexicographic Order using
Recursion
Python Program to Print All Permutations of a String in Lexicographic Order without
Recursion
Python Program to Check if the Substring is Present in the Given String
Python Program to Find Common Characters in Two Strings
Python Program to Print All Letters Present in Both Strings
Python Program that Displays which Letters are in First String but not in Second
Python Program that Displays Letters that are not Common in Two Strings
Python Program to Create a New String Made up of First and Last 2 Characters
Python Program to Find the Larger String without using Built-in Functions
Python Program to Swap the First and the Last Character of a String
Python Program to Sort Hyphen Separated Sequence of Words in Alphabetical Order
Python Program to Count the Occurrences of Each Word in a String
Python Program to Count Number of Vowels in a String using Sets
Python Program to Check if a Given String is Palindrome
Python Program to Check whether two Strings are Anagrams
Python Program to Check whether a String is Palindrome or not using Recursion
Python Program to Find All Odd Palindrome Numbers in a Range without using
Recursion
Python Programs on Dictionary
Python Program to Create Dictionary from an Object
Python Program to Check if a Key Exists in a Dictionary or Not
Python Program to Add a Key-Value Pair to the Dictionary
Python Program to Find the Sum of All the Items in a Dictionary
Python Program to Multiply All the Items in a Dictionary
Python Program to Remove a Key from a Dictionary
Python Program to Concatenate Two Dictionaries
Python Program to Map Two Lists into a Dictionary
Python Program to Create a Dictionary with Key as First Character and Value as
Words Starting with that Character
Python Program to Create Dictionary that Contains Number
Python Program to Count the Frequency of Each Word in a String using Dictionar
Python Programs on Tuples
Python Program to Create a List of Tuples with the First Element as the Number and
Second Element as the Square of the Number
Python Program to Remove All Tuples in a List Outside the Given Range
Python Program to Sort a List of Tuples in Increasing Order by the Last Element in
Each Tuple Advertisement
Python Programs on Classes & Objects
Python Program to Create a Class which Performs Basic Calculator Operations
Python Program to Append, Delete and Display Elements of a List using Classes
Python Program to Find the Area of a Rectangle using Classes
Python Program to Find the Area and Perimeter of the Circle using Class
Python Program to Create a Class in which One Method Accepts a String from the
User and Another Prints it
Python Program to Create a Class and Get All Possible Distinct Subsets from a Set
Python Programs on File Handling
Python Program to Read the Contents of the File
Python Program to Copy One File to Another File
Python Program to Count the Number of Lines in Text File
Python Program to Count the Number of Blank Spaces in a Text File
Python Program to Count the Occurrences of a Word in a Text File
Python Program to Count the Number of Words in a Text File
Python Program to Capitalize First Letter of Each Word in a File
Python Program to Counts the Number of Times a Letter Appears in the Text File
Python Program to Extract Numbers from Text File
Python Program to Print the Contents of File in Reverse Order
Python Program to Append the Content of One File to the End of Another File
Python Program to Read a String from the User and Append it into a File
Python Programming Examples on List
Python Program to Find Largest Number in a List
Python Program to Find Second Largest Number in a List
Python Program to Print Largest Even and Largest Odd Number in a List
Python Program to Split Even and Odd Elements into Two Lists
Python Program to Find Average of a List
Python Program to Print Sum of Negative Numbers, Positive Even & Odd Numbers
in a List
Python Program to Count Occurrences of Element in List
Python Program to Find the Sum of Elements in a List using Recursion
Python Program to Find the Length of a List using Recursion
Python Program to Merge Two Lists and Sort it
Python Program to Remove Duplicates from a List
Python Program to Swap the First and Last Element in a List
Python Program to Sort a List According to the Second Element in Sublist
Python Program to Return the Length of the Longest Word from the List of Words
Python Program to Find the Number Occurring Odd Number of Times in a List
Python Program to Generate Random Numbers from 1 to 20 and Append Them to the
List
Python Program to Remove the ith Occurrence of the Given Word in a List
Python Program to Find the Cumulative Sum of a List
Python Program to Find the Union of Two Lists
Python Program to Find the Intersection of Two Lists
Python Program to Flatten a List without using Recursion
Python Program to Find the Total Sum of a Nested List Using Recursion
Python Program to Flatten a Nested List using Recursion