Oops, typo.

This commit is contained in:
Jeremy Fincher 2003-10-19 21:13:41 +00:00
parent 1509219cc9
commit 2505376951
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ command.
Whenever joining more than two strings, use string interpolation, not addition:
s = x + y + z # Bad.
s = '%s%s%s' % (x, y, z) # Good.
s = ''.join(x, y, z) # Best, but not as general.
s = ''.join([x, y, z]) # Best, but not as general.
This has to do with efficiency; the intermediate string x+y is made (and thus
copied) before x+y+z is made, so it's less efficient.