It's pythons way of making getters/setters. The @ symbol means the property function is used as a decorator, this is syntactic sugar for property(fget=info)(fget is the getter function). When someone wants the property named info(which was a variable initially) it returns the result of the info function instead.
Super smart to read it backwards. However, it doesn't handle a case where the number of repetitions has more than 1 digit (like in '16(ab)'), instructions are unclear on that point
It would be brilliant if you knew all the task.
Also this code can not solve such task: a2(b)c2(d)
It gives the result: abcddbcdd
But the right result is: abbcdd
This comment is hidden because it contains spoiler information about the solution
It's pythons way of making getters/setters. The @ symbol means the property function is used as a decorator, this is syntactic sugar for property(fget=info)(fget is the getter function). When someone wants the property named info(which was a variable initially) it returns the result of the info function instead.
you're right
Super smart to read it backwards. However, it doesn't handle a case where the number of repetitions has more than 1 digit (like in '16(ab)'), instructions are unclear on that point
That is brilliant!!!!