The format( ) function used with strings is very versatile and powerful function used for formatting strings. • The ‘in’ and ‘not in’ operators can be used with strings to determine whether a string is present in another string. Points to remember: Hands on Experience . Write a python program to find the length of a string.
. Write a program to count the occurrences of each word in a given string. 12th Computer Chapter - - Strings and String Manipulation . Write a program to add a prefix text to all the lines in a string.
. Write a program to print integers with ‘*’ on the right of specified width. . Write a program to create a mirror image of the given string.
For example, “wel” = “lew“. . Write a program to removes all the occurrences of a give character in a string. .
Write a program to append a string to another string without using += operator. . Write a program to swap two strings. .
Write a program to replace a string with another string without using replace(). . Write a program to count the number of characters, words and lines in a given string.