Re: [Tutor] spaces in print

2005-01-12 Thread Jacob S.
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 elimin

Re: [Tutor] spaces in print

2005-01-12 Thread Alan Gauld
> print '\n','siday_q', key, '.wav'# event > > > i get: > > siday_q 515 .wav > > > how can you eliminate the spaces to get: > > siday_q515.wav Use the os path facilities to join file names etc together, its portable and safer(more reliable). However to join strings without spaces I fi

Re: [Tutor] spaces in print

2005-01-12 Thread Max Noel
On Jan 12, 2005, at 17:17, kevin parks wrote: 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 The quick and dirty way is to do: print '\n' + 'siday_q' + key + '.wav' The elegant way is to do use