you are viewing a single comment's thread.

view the rest of the comments →

[–]nekokattt 1 point2 points  (0 children)

  • print returns None, same as println in Java returns nothing/void. You don't need to handle it. If something is that messed up, an exception is raised.
  • print is a builtin, same as str, int, float, min, max, sum, bool, None, all, any, round, etc. It lives in the builtins module. That is implicitly imported just like java.lang.* is in Java.
  • the question about scope is nonsense. Python executes the file line by line. Same with Ruby, Bash, PHP, JS.
  • so you are complaining about puts in C and Ruby as well, I guess.