"john boy" <[EMAIL PROTECTED]> wrote: > ok...I am running the following program: > > def printMultiples (n): > i = 1 > while i <= 6: > print n*i, ' \t ', > i = i + 1 > i = 1 > while i <= 6: > printMultiples(i) > i = i + 1 > > this is supposed to return a simple multiplication table, but for > some reason it does not want to stop printing after 6 columns... > instead it prints from left to right for a total of 10 columns... > I need some sort of a "stop print" after the first 6 columns
if "stop print" means "start a new line", a plain "print" will do what you want: def printMultiples (n): i = 1 while i <= 6: print n*i, ' \t ', i = i + 1 print (you may also want to read up on the for-in loop statement; the tutorial has more information on this) </F> -- http://mail.python.org/mailman/listinfo/python-list