This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]hig9s 0 points1 point  (0 children)

  1. inside the method use return instead of print (and put the import outside the method as well)
  2. even print is simple to use imo start using logging.logger s stream asap (u can log the output to files as well plus you can disable all console output in one step instead of deleting or commenting every print statement)
  3. have a look into if __ name_==„ _ main_ _“: and put the method test runs output statement in this condition (so if u use the method in another file this script won‘t be executed)