Newbie: Print question
Fredrik Lundh
fredrik at pythonware.com
Wed Mar 22 13:17:56 EST 2006
Tommy Grav wrote:
> for testobs in obslist:
> print testobs.printmpc()
print.
> def printmpc(self):
> if self.mag!="":
> print "%14s %12.5f %5.2f %6.2f %8.3f %3i"
and print.
> I don't understand where these None's are coming from.
for each testobs, you're printing stuff inside the printmpc method, and you're
then printing the return value from the method. removing the extra print
for testobs in obslist:
testobs.printmpc()
should fix this.
</F>
More information about the Python-list
mailing list