|  |  | Python Library Reference |  |  |

Previous: 18.3 token Up: 18. Python Language Services Next: 18.5 tokenize

# 18.4 `keyword` -- Testing for Python keywords

This module allows a Python program to determine if a string is a keyword. A single function is provided:

`iskeyword`(s)
  Return true if s is a Python keyword.

|  |  | Python Library Reference |  |  |

Previous: 18.3 token Up: 18. Python Language Services Next: 18.5 tokenize

Release 2.2, documentation updated on December 21, 2001.