Python Strings

Python string is a data structure that holds list or a string of characters. These characters could be

  1. a single letter
  2. a number
  3. symbol
  4. or special character


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.

\’single quote
\”double quote
\fform feed(FF)
\nline feed(LF)
\rcarriage return(CR)
\tsingle TAB space
Special characters in python

The rest of the string related topic is discussed in future articles.


Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Exit mobile version