Tokens in Python
Tokens in Python
The smallest unit/element in the python
program/script is known as a Token or a Lexical
unit.
? Python has following Tokens:
?
?
Keywords
?
Identifiers
?
Literals
?
Operators
?
Punctuators
Keywords
Keywords are the reserve words/pre-defined words/special words
of python which have a special meaning for the interpreter.
False
True
None
def
if
lambda
class
yield
continue
else
assert
or
while
break
elif
del
from
is
not
pass
for
global
finally
import
as
in
int
nonlocal
except
return
Raise
With
print
And
Identifiers(user defined names)
? Must be
made up of
only letters,
numbers
and
Underscore(_)
Rule 3
Nonkeyword
word
with no
space in
between
Rule 2
Rule 1
? Identifiers are the name given to the different
programming elements like variables, objects,
classes, functions, lists, dictionaries etc.
? Cannot
begin
with a
Number,
although
may
contain
numbers
Identifiers
Some Valid Identifiers:
\
Literals
? Literals are the data items that have a fixed or
constant value
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- python 3 cheat sheet ca
- pattern matching and text manipulation bram kuijper
- python quick guide tutorialspoint
- coral programming language reference manual
- introduction tokens barebones of python variables
- declare multi line string c
- class xi computer science 083 python basics literals
- python fundamentals
- tokens in python
Related searches
- sort dictionary in python by values
- shape in python numpy
- array shape in python numpy
- str in python example
- join in python using on
- replace character in python string
- create a matrix in python using for
- random generator in python examples
- create matrix in python numpy
- install numpy in python 2 7
- tuple in python example
- numpy in python tutorial