Python Lab Manual / Python on strings operations

Program Name

Write a Pytnon Program for strings operations.
Theory
Python on strings operations are length, comaprison of two strings and occurrence of character in string.
Program Code


Input:
Enter a String:wisdom

Enter first String:wisdom
Enter second String:materials

Enter a String:wisdom
Enter a Character:d
Output:
String Length Program
Enter a String:wisdom
String Length: 6

string Comparison  Program
Enter first String:wisdom
Enter second String:materials
Strings are Not Equal

Occurrence of character in String Program
Enter a String:wisdom
Enter a Character:d
occurrence of character in String:  1



Home     Back