Ad
  • Custom User Avatar

    Definitely shorter, but not more readable IMHO.

    If you want something that sort, but a bit more readable (and pythonic) you could use:

    return ans if ans and len(ans) < 140 else False

    Anyways, ans is never going to be empty because you already inserted '#'