PY3: Use builtin bool instead of directly calling the special method...

...and removing intermediate lists.
PY3: Don't call nonzero directly.