[Tutor] Formatted writing to a file

Alan G alan.gauld at freenet.co.uk
Sat May 28 10:34:17 CEST 2005


> >Just create the string outsoide the formatting line:
> >
> >fmtString = '%%ds' % width
>
> I think it should be '%%%ds' % width

Good catch Bob, you need the extra % to 'escape' the literal %
character.

Alan G.



More information about the Tutor mailing list