Table of Contents
Python string is a data structure that holds list or a string of characters. These characters could be
- a single letter
- a number
- symbol
- or special character
Unicode
The letters are both lowercase and uppercase which we human can understand. The capital 'A' for us is same as lowercase 'a'
The Unicode is a universal IT standard that use hexadecimal letters to represent a single character.
Therefore, we can represent 'A' in Unicode.
\u0041 # represent Unicode A \u0061 # represent Unicode a
Note that the hexadecimal is a number system to represent decimal numbers using 0 to 9 and A to F. The A to F stands for 10 to 15. Therefore, to total character in hexadecimal is between 0 to 15.
Special Characters
There are characters that does not have symbols. For example, line feed(LF) or carriage return (CR).
The computer start writing or reading from a new line of the text upon receiving these characters.The computer use Unicode characters for these special characters.
There are many special characters in a normal Qwerty keyboard. Here is a list of common characters used in python programming language.
| Character | Name |
| \\ | backslash |
| \’ | single quote |
| \” | double quote |
| \b | backspace |
| \f | form feed(FF) |
| \n | line feed(LF) |
| \r | carriage return(CR) |
| \t | single TAB space |
The rest of the string related topic is discussed in future articles.