Working with Strings

As we learned earlier, mathematical operations can not be performed on strings. If we try performing a mathematical operation on a string, we will get an error. The exception is, (+) can be used to merge the strings together. String concatenation or (*) could be used to repeat the string. But, this operation requires a string and an integer while working with strings.

No other mathematical operation is possible with the strings. If we try to perform such an operation, we will encounter another kind of error, TypeError, where it conveys that the operation is not possible between a string and another string.