Traversing a String
Iterating through the elements of a string, one character at a time is called traversing a given
string.
Concatenation of Strings
‘+’ operator is used for concatenation of String. When used with numbers, ‘+’ performs addition
and is called the addition operators, but when used with Strings, it is called concatenation
operator since it joins or concatenates strings.
Numbers and Strings cannot be combined as operands with a ‘+’ or ‘-’ operator.
Replication of Strings
‘*’ operator when used with numbers performs multiplication but when used with a string and
a number performs replication of the string ‘number’ times.
For replication, Python creates a new String that is a number of repetitions of the input String.
The original String is not modified as strings are immutable. New strings can be created but
existing strings cannot be modified.
Indexing in Strings
The indexes of a string begin from 0 to (length-1) in forward direction (forward indexing)
and -1,-2,-3….,-length in the backward direction(backward indexing).
Empty string: A string that has 0 characters. Just a pair of quotation marks.