[Tutor] Space
Sean 'Shaleh' Perry
shalehperry@attbi.com
Sun, 17 Mar 2002 18:34:17 -0800 (PST)
>
>
> At http://starship.python.net/~da/jak/cookbook.html
> It says
> "In python, the print statement has very good default semantics --- most of
> the time, it does exactly what you want, putting a space between the
> arguments, and a newline at the end. If you want more control over the
> formatting, use the % operator [link to % operator]: rather than
> print k, ':', string.join(v)
>
> you could use
> print "%s: %s", (k, string.join(v))
>
> to avoid the space before the colon."
>
as Remco points out, the cookbook here is wrong. You did nothing wrong, you
just read a bum example (-: