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.
i see! thank you.
instead you could use
@ring ~ importing globally allows any function in that same scope to make use of the module
@Arthur ~ Python does allow you to import within a function, (limiting the scope to that function itself)
you cannot import it inside the function, it should be global for future resuse, i have not yet tried but even if it works is a bad practice. thank you
why put "import math" outside the function? doesn't it cause a problem when calling the function in a program it was not declared in?
Yes, but it's considered a bad practice (for example, if you do it with several modules, there can be name collisions). Better import just the methods you need, or import the module like you did here.
Oh that is nice, i did not know you could use the method directly with from X import *! Does this work for every import?
This comment is hidden because it contains spoiler information about the solution
yeah I would have gone about it differently if they included a statement about not modifying the signature
That's interesting.
Super functional
ty <3
Nested list comprehensions NICE
This comment is hidden because it contains spoiler information about the solution
Very concise!