Alan Gauld wrote: >>>> # print " " >>>> # print " In strongfac " >>>> # print " Found1: x = ",x >>>> >>> You could do all of this with a single print: >>> >>> print "\n In strongfac \nFound1: x = ", x >>> >>> >> uuuuuuuuuh.. Too compact for me. >> I need to see the logic more spread out. >> > > \n is the newline character. > An alternative is to use triple quotes: > > print ''' > In strongfac > Found1: x = ''',x > > But that still clutters up the code listing with extra lines that > have nothing to do with the algorithm - the main advantage in > reducing to one print statement..
This is obviously a matter of personal preference. I prefer the longer form as well - I usually use a separate print statement for each line of output. I would say it has everything to do with the function, if not the algorithm - it clearly represents the form the output will take. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor