Simple formatting string question
Alex
cut_me_out at hotmail.com
Thu Apr 13 15:02:49 EDT 2000
More information about the Python-list mailing list
Thu Apr 13 15:02:49 EDT 2000
- Previous message (by thread): Simple formatting string question
- Next message (by thread): Simple formatting string question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> I'm trying to print something like this:
>
> >>> print 6*'%2i' '%1i' % tuple([5,5,5,5,5,5,1])
>
> but I'm getting an error.
This works:
print (6 * ('%2i') + '%1i') % tuple([5,5,5,5,5,5,1])
It's all a matter of operator precedence. :)
Alex.
- Previous message (by thread): Simple formatting string question
- Next message (by thread): Simple formatting string question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list