Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Same! It's just so satisfying.
thanks :)
Nice work, looks clean :)
god i love these so much. there is just something i love about code in one line.
This comment has been deleted.
Thank You. That was a really concise explanation.
In a class, there are three types of methods: instance methods, class methods, and static methods. Instance methods are defined with a mandatory parameter
self
, alongside any other required parameters. For class methods, we use the@classmethod
decorator before the method and include a mandatory parameter namedcls
, along with other parameters. Static methods, on the other hand, don't require a decorator and function like normal Python functions without needing a mandatory parameter. When written within a class, they behave as static methods by default, but you can add clarity by using the@staticmethod
decorator. Remember it's common practice to use decorators and highly recommended.Why did you use @staticmethod on top of all the functions? (I am a newbie so pardon my questions)
In your problem I don't think you need a constructor(you can pass) for your given tasks.
I didn't think of that. Nice one.