to find the list of keywords import keyword keyword.kwlist to find the length of keywords import keyword len(keyword.kwlist)