Newbie: Print question
fredrik at pythonware.com
Wed Mar 22 19:17:56 CET 2006
Tommy Grav wrote:
> for testobs in obslist:
> print testobs.printmpc()
> def printmpc(self):
> if self.mag!="":
> print "%14s %12.5f %5.2f %6.2f %8.3f %3i"
> 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:
should fix this.
More information about the Python-list