Re: printing

Jose M. Pereira (pereira@cocaina.inesc.pt)
Thu, 10 Feb 94 19:34:15 +0100

>>>>> "Lance" == lance <lance@markv.com> writes:

>> What's wrong with:
>>
>> print a + ',', b
>>

Lance> Nothing except that the 'print a' is before a loop,
Lance> the "print ', '" is inside the loop in an 'if' statement,
Lance> and the 'print b' is inside that same loop....

Lance> for example...

Lance> print a,
Lance> for n in <whatever>:
Lance> if <whatever condition>:
Lance> print ', ',
Lance> print b,
Lance> print ''

Try this:

x=a
for n in <whatever>:
if <whatever condition>:
x=x+', '+b

print x

Cheers,
Jose'