Followers

Monday, November 18, 2019

TOKENS

TOKENS

So today in this Post we will tell you about TOKENS which is also an element in PYTHON.

In a passage of text, individual words and punctuation marks are called TOKENS or LEXICAL UNITS. The smallest individual unit in a program is known as a TOKEN or A LEXICAL UNIT. 

Consider the following figure that tells what a token means.

                                   An English Sentence
          "Hurray!", he exclaimed, "We are the world Champions."  
Here all the elements are the lexical unit i.e., the commas, exclamation marks, words, ,etc are all tokens or lexical units in an english sentence. Here two types of tokens are used : Words and Punctuation marks.

There are Five types of Tokens in Python. They are as follows :-

  (i). Keywords
 (ii). Operators
(iii). Identifiers(Names)
(iv). Literals
 (v). Punctuators

So we will talk about all these different types tokens in the next Post. 


So with this we are end with this Post. Don't Forget To Follow Me on Bloggers.
JAI HIND!!! 
VANDE MATARAM!!!!!

No comments:

Post a Comment

If you have any doubts, please do let me Know.