Ad
  • Default User Avatar

    I know this is 2 years old, but if you know about the format() function you can eliminate your casts to strings & your len() blocks. Then you'd just have the math & a return statement which seems reasonable to me.