Posts

Showing posts from September 5, 2020

Character Set and Tokens in Python

Image
  Character Set : Character Set in Python consist of  valid characters such as alphabets, digits or special characters that are recognized by the library of Python Language. Alphabets:                         A,B,......Y,Z or a,b,.......y,z. Digits:                               0,1,2,3,4,5,6,7,8,9 Special Character:      ~!@#$%^&*()_+{}[];:'"\,./<> etc. White spaces    :             Blank space, new line, etc. Token: The smallest individual unit in a program is referred as 'Token'. It is also called Lexical Element or Lexical Unit. It can be categorized as: 1. Keywords : Keywords are the reserved words that has specific function in a program. These words are used while writing program to get desired output. The keywords are executed  as its purpose/action is already explained inside the language interpreter. All Keywords are written in lower case. Keywords are also called 'Reserved Words'. There are 33 keywords in Python. 2. Identifiers : Identi