21
adamspj
5 23 40 Leader of the month
2636/ 2695
Awesome Team Paul Adams
Last seen 10 hours ago
Member for 3 months, 27 days
Difficulty Normal
Best reviews / Newest reviews
without re, 6 lines-kdim 1
Voodoo! But good. I was looking to see how it would be done without re. It's a bit sneaky the way you got the part() function to do double duty, essentially behaving as two functions in one and packing the two different results into a list. It has to be admitted that this is somewhat cryptic, in th More
First-gleb10101010101 1 1
If you want to go wacky, what about return (a ** ((a | 1 ) / (1 | a))) * (b ** ((b | 1) / (1 | b))) More
First-Ali.Pxl 1 1
I overcomplicated things, whereas this is straightforward and clear. More
combinations_with_replacement-kdim 1
You're forcing me to learn a little more about lambda functions and the alias "check" that you used here. It surprised me to see that you could declare pr = primefactors(n) AFTER pr is used in the lambda function, named "check." But it works! I experimented with this in very primitive form: More
not recurring solusion-tamagoyaki 1
Interesting, though I was a bit confused at first about how you were popping out a list then inserting back the elements into array to be processed again in subsequent iterations. Ultimately, it does make sense. More
clear and readable-kdim 1
This is helpful in several ways, including the for look catching two values and the illustrative use of setdefault. More
max(start_watching or end, end)-Phil15 1
Sorry, this is not "clear". It may be clever, but the terseness is the opposite of clear. It reduces readability. More
max(..., key, default)-Phil15 1
I've got to give you credit since I've never used the default argument to max before, and thus I've learned. More
Downward-Tinus_Trotyl 1 1
It's clever and aesthetic as a kind of concrete poetry (look at the cascade of indents!), but it's not very readable. It's a puzzle of sorts (which ultimately makes sense when it's "solved" by the reader). I'd categorize it as "creative," but for the sake of clarity, add some comments. E.g. \# Chec More
Datetime of course-Kolia951 1 1
You've shown good knowledge of the .strptime() and .strftime() methods. However, you could avoid rebuilding the format of iso datetimes by using the lfromisoformat() and .isoformat() methods instead. It's good to see you returned a string as requested. So many solutions did not; they often returned More
generator-kdim 1
Cool, and yet another thing I have to learn to make use of: "yield from". More
clear-kdim 1
This was a little hard for me to analyze, but having done the same mission, it made sense to me in the end. The main good thing is I learned from it, particularly the use of the star operator in the assignment right at the beginning. I've never unpacked a list in an assignment this way. The handlin More
Logical-amandel 1
Wow, this was mind-bending for me because I'd never before tried using logical "and" and "or" between non-Boolean values. I tried to compare in my mind to bitwise & and |, but that wasn't right. I learned the right way once upon a time, but forgot it because I never actually put it to use. But now I More
POP-APPEND-U.V 1
The "range(len(items)-1,-1,-1)" feels a little clunky. You could try: for i in range(1, len(items)): if not items[-i]... More
First-tamagoyaki 1 1
Hmmm... I guess subtracting max of lists of zero works, though I'd think an if statement is clearer for reading. More
count-Sim0000 1
I like the c = instructions.count. Whereas I don't always like abbreviating function (method) names like this, in the particular case, where the whole thing is simple, the readability of the code is actually improved and it remains perfectly clear. More
First-Amachua
Apparently the "Ko-Ri-An" (Hanguk-eo) language expresses "I love Python" by saying "I Python Python"! Fun, though. More
First-superoliviero
This looks very straightforward to me. It's easily readable, and readability is very important to me. More
quest grinding-Bifftastic
What does the "else None" do for you? More
First-sanjieyu
Looks good. Note, also, that you could have done: for _ in range(i): since you didn't really need the value x in your code. More
1
2 3