Ad
  • Custom User Avatar

    I really admire the simplicity of this regex. I tried to solve it with a regex too, but failed. Some regex are so convoluted you do not want any of them in your code. But this piece of code is just nice.

  • Custom User Avatar

    I like the solution, but in my opinion a bare try/except is not a good substitute for an if statement. It is suitable in this context, but is not best practice in a broader way.