print format

Steven D. Majewski sdm7g at Virginia.EDU
Wed Jul 26 12:36:39 EDT 2000


On Wed, 26 Jul 2000, Curtis Jensen wrote:

> Also, anyone know how to print formatted text with a list and not a
> tuple?
> 

Well, besides:

	print  ( len(list) * fmt_str ) % tuple( list ) 

there's: 

	print string.join( map( operator.__mod__, 
				len(list)*[fmt_str],
				list ),  sep_chr )






More information about the Python-list mailing list