[Tutor] spaces in print

Jacob S. keridee at jayco.net
Thu Jan 13 01:40:13 CET 2005


Don't forget the string method join()!

print "".join(['\n','siday_q',key,'.wav'])

It works too ;-) (though I like the string formatting better for this.)
Jacob

> 
> 
> when i print:
> 
>      print '\n','siday_q', key, '.wav'# event
> 
> 
> i get:
> 
> siday_q 515 .wav
> 
> 
> how can you eliminate the spaces to get:
> 
> siday_q515.wav
> 
> 
> ?
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
> 
> 


More information about the Tutor mailing list