perl style formating
Les Ander
citykid at nospam.edu
Fri Dec 14 22:05:21 EST 2001
Hi,
i am new to python.
say i wanted to print out 3 variable in the following format:
$name is left justified and has the width of size 10
$comment is left justified and starts at column 11 and ends at 40
$line starts at 41 and is of variable length)
in perl i would write it as:
format OUT =
@<<<<<<<<<< >@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >@*
$name, $comment, $line;
.
$~="OUT";
how do i write it in python?
thanks
les
More information about the Python-list
mailing list