Ad
  • Custom User Avatar

    For simple statements like this, it's quite pythonic to put it on one line. Even for more complicated statements with ifs and for loops and generators, it is still often pythonic to put it on one line.

    YMMV in other languages.

  • Custom User Avatar

    I don't know about industrial programming, but here it is often done like this