22
DahliaSR
7 23 46
2682/ 2945
Dahlia Ramm
Last seen 1 year ago
Member for 8 years, 1 month, 3 days
Difficulty Normal
Best reviews / Newest reviews
Say Hi-svartmetall 3 1
Nice! +2 for using an f-string. More
Enum-veky 2 1
Maybe a bit too much for this task **but** a great example on what is possible. This also is the best approach if you ever want to decode a roman numeral to decimal rep. Just add decode method and your're done. Great! More
Spot the difference!-veky 2 1
Whoo, took me some minutes to figure out how the lamdba works here (thanks to Pythontutor :D) Really cool! More
6502 like pseudo assembly-Tinus_Trotyl 2 2
Very complicated and lots of redundant expressions. - Line 12: a = n What for? You are not reusing the original value of _n_ anywhere, so why do need a copy of it? - Line 16: a, c = a//2, a%2 using _divmod()_ is shorter and clearer... a, c = divmod(a, 2) - Line 17 to 18: More
First-__________________789 2 1
Wow, this one is scary! + the readability of this is bad while True: if flist[len(flist)-1] > 5000: break else: flist.append(flist[len(flist)-1]+flist[len(flist)-2]) what about this? while flist[-1] < 5000: flist.append(flist[-1] + flist[-2]) + You are More
abc-dev0611 2
Hm... Correct idea but you haven't thought it to the end. Your `add_food` and `add_drink` methods are **exactly** the same in all the concrete classes, so why do have to enforce yourself to override them in each subclass? And your `total` method doesn't need an override too. You could simply use More
itertools.groupby-flpo 2 3
@veky once argued with me, because I was mapping a lambda. He explained that this is a LISPsm!!! I don't see why using a LISPsm is bad, by **I do agree** that mapping a lambda is not good when an generator expression can do the job: max( (len(list(v)) for k, v in groupby(line), default= More
What's up, __doc__?-veky 2 1
Cheater! The taks asked you to **calculate** the return value and not to look it up in a table. :D More
Compilation-veky 2 1
Damn... I added a boundary to my regex-pattern for no reason. More
First-karmokarbiswajit 1
line 4: for let in list(text) why are you casting 'text' to a list? Strings are iterable! line 5: a.append(let) if let.isupper() else [] what is the else for? What exactly is line 6 for? You are assigning a copy of a to b while return ''.join(a) would have done the same. More
First-kurosawa4434 1 1
and one more time... Nice! But why are u using key = lambda x: abs(x) instead of key=abs More
First-Kamil0320 1
Nice Approach, but cutting down the length of line 2 would have been a good idea. More
RegExp-d0kt0r 1
The task description is very precise here: > Here you should find the length of the longest substring that consists of the **same letter**. The regex token `.` matches any single character except for line separators, so if the tests will be updated to check something like this: assert long_re More
O RLY?-veky 1 2
Hmmm, I was expecting something more special, but I should have known better. :D More
Simple-Pouf 1 1
Calling _filter_, which calls a lambda, which calls _bin()_... Why not an if statement in the generator? ''.join(chr(c>>1) for c in message if not bin(b).count('1') & 1 More
Second-drussell 1 1
Okay... Now think about this: for x in data[:]: if data.count(x) == 1: data.remove(x) return data More
Simple-brubru777 1 1
Very nice and clear. Just one small thing: Instead of using this: wall.strip().split('\n') it would be more readable and simpler to use `str.split()`: wall.strip().split('\n') By default `str.split()` splits at any whitespace character and treats consecutive whitespace characters as a s More
smn theorem-veky 1 1
Learned something new - again! If I got it wright, using functools.partial() makes most sense if you are actually planning to reuse the partial object? More
First-Sim0000 1
Straight forward! Using an f-string would be worth +2. :D More
1
2 3 4 5 6 7 8 9