diff options
author | Fred Drake <fdrake@acm.org> | 2002-10-16 15:30:17 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-10-16 15:30:17 (GMT) |
commit | 071972e426c9782611bd5b66f036d35d809f7ee4 (patch) | |
tree | ec6f4f3a441a7365759dd13566c334b3d03ad97f /Doc/tools/keywords.py | |
parent | 06912b7702e46a1a31749b31911be4d44ccbdf27 (diff) | |
download | cpython-071972e426c9782611bd5b66f036d35d809f7ee4.zip cpython-071972e426c9782611bd5b66f036d35d809f7ee4.tar.gz cpython-071972e426c9782611bd5b66f036d35d809f7ee4.tar.bz2 |
Use string methods.
Diffstat (limited to 'Doc/tools/keywords.py')
-rw-r--r-- | Doc/tools/keywords.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Doc/tools/keywords.py b/Doc/tools/keywords.py index 6da352a..876987d 100644 --- a/Doc/tools/keywords.py +++ b/Doc/tools/keywords.py @@ -2,11 +2,10 @@ # This Python program sorts and reformats the table of keywords in ref2.tex -import string l = [] try: while 1: - l = l + string.split(raw_input()) + l = l + raw_input().split() except EOFError: pass l.sort() @@ -16,5 +15,5 @@ ncols = 5 nrows = (len(l)+ncols-1)/ncols for i in range(nrows): for j in range(i, len(l), nrows): - print string.ljust(l[j], 10), + print l[j].ljust(10), print |