Here's an explanation of the parts that may be tricky. Will not explain things such as lambda and generator expression. -~i is the same as (i+1). Multiplying an int named n and a list named xs results in a list with the contents of xs repeated n times.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
They are required if you have multiple arguments or no arguments, in this case, it wasn't required but he put it anyway.
This comment is hidden because it contains spoiler information about the solution
But they can be? The second example has a negative, and so do some of the test cases.
Your teammates and your papers can not be negative.
I also did the same thing. My thinking was to have actual implementation first, then the exceptional case.
This comment is hidden because it contains spoiler information about the solution
Here's an explanation of the parts that may be tricky. Will not explain things such as
lambda
and generator expression.-~i
is the same as(i+1)
. Multiplying anint
namedn
and alist
namedxs
results in alist
with the contents ofxs
repeatedn
times.I see. Thank you so much!
Please use spoiler flag, otherwise your posts are visible in the homepage.
ok my friend