Ad
  • Custom User Avatar

    Thank you very much for your response! But I still don't really get the point. I know this is a smart way, but I don't know why it works. In other word, why does only returning a function works? (ultimatly we just want to return a value right?) And why no argument is used in this lambda?

  • Custom User Avatar

    It's a smart way to use the attributes defined in __init__ as functions (that's what the kata requires, which is not very pertinent since they'd rather be considered merely as properties entirely defined at the creation of the instance; it does not make much sense to have to calculate them again at each function call).

  • Custom User Avatar

    Why lambda is used?

  • Custom User Avatar

    I actually don't know why this can work for the string with double space.