May 2001
Intermediate to advanced
304 pages
6h 12m
English
The token module, shown in Example 13-21, contains a list of all tokens used by the standard Python
tokenizer.
Example 13-21. Using the token Module
File: token-example-1.py import token print "NUMBER", token.NUMBER print "PLUS", token.STAR print "STRING", token.STRINGNUMBER 2PLUS 16STRING 3
Read now
Unlock full access