String¶
How To: Basic::String
Calculate the length
Format string
Count the character frequency
Get a string made of the first/last 2 chars
Replace char occurrences
Get a single string from two
Add ‘ing’ at the end
Find and replace the appearance of the substring
Find the longest word in the list
Remove the N-th index character
Exchange the first and last chars
Remove the characters which have odd index
Count the occurrences of each word
Displays a user’s input back in upper and lower cases
Print an unique words (CSV) in sorted form
Create the html string with tags around the word(s)
Insert a string in the middle
Made 4 copies of the last 2 chars
Get first three characters
Get the last part before a specified character
Reverse string if it’s length is a multiple of 4
Convert string to all uppercase
Sort lexicographically
Remove a newline
Check whether a string starts with specified characters
Create a Caesar encryption
Display formatted text (width=50) as output
Remove existing indentation from lines
Add a prefix text to all of the lines
Set the indentation of the first line
Print floating numbers upto 2 decimal places
Print floating numbers upto 2 decimal places with sign
Print floating numbers with no decimal places
Print integers with zeros on the left
Print integers with ‘*’ on the right
Display a number with a comma separator
Format a number with a percentage
Display a number with alignments
Count occurrences of a substring
Reverse characters
Reverse words
Strip a set of characters
Count repeated characters - collections
Print a special symbols
Print the index of the character
Check if a string contains all letters of the alphabet
Convert a String in a List
Lowercase first N characters
Swap comma and dot - maketrans
Count and display the vowels of a given text
Split a string on the last K occurrence of the delimiter
Find the first non-repeating character
Print all permutations of characters - itertools
Find the first repeated character
Find the first repeated character with smallest first occurrence index
Find the first repeated word
Find the second most repeated word
Remove spaces
Move spaces to the front
Find the maximum occurring character
Capitalize first and last letters of each word
Remove duplicate characters
Compute sum of digits
Remove leading zeros from an IP address
Reverse each word in a sentence
Cypher text
Palindrome