40
suic
16 39 57
9964/ 10664
Last seen 4 days ago
Member for 9 years, 10 months, 19 days
Difficulty Advanced
Best reviews / Newest reviews
Holy Cow This Was Hard.-schanjr 1
Hi, I have a few comments: 1. Lines 47-50: if...else is "misused", you could write: if alpha != j: out_tup.append(j) 2. Lines 33-36: Use list comprehension instead. You use elsewhere in you code, so why not here? j = [i for in self.connections if len(i) == 2] 3. _ More
First-LMAO
Hi, you don't need the [] on line 10. More
Digits Multiplication -schanjr
Good one! P. S.: You can omit the >= 1 at the end. More
First-Slepice1
Hi, with all() you could make it a one-liner. More
First-WpoZoo 1
Hi, one comment: I would replace lines 13-15 with one line: # You can apply map(int, ) directly on splitted_data # and use it as argument of date year, month, day = map(int, splited_data[0].split('-')) # In fact you can eliminate these these three variables call_data More
Simple dict-DiZ 1
_d_ is superfluous. As a one-liner it would be "more creative". :) More
List comprehension inside a join() function-juhokarppinen 1
Hi, you don't need list comprehension at all: 1. [] are redundant. 2. Look at _filter()_. More
First-spoty 1
Why not _c.isalpha()_ instead of _c in ascii_lowercase()_? :) More
First-jose.coto
Hi, 1. `sum(array) * len(array)` is redundant you can `return 0`. 2. If `array` is not empty then `array[len(array)] == array[-1]`. More
First-ZestyPickles
Hi, all the nested `if`s are redundant. __bool__ is subclass of __int__. You could write e. g.: elif operation == 'equivalence': return x == y More
lambda lambda lambda-njm2ody
It's a bit "overlamdized" :) A small tip: # Change b, c in a way you don't need to use not # and then you can write: return a(data) and b(data) and c(data) # what you could transform return all((a(data), b(data), c(data))) # and finally: return all(f(data) for More
First-illuminatus
Hi, some advices: # 1. You can use negative indexes array[len(array) - 1] == array[-1] # 2. You don't need the z variable: array[::2] == array[:len(array):2] # 3. sum is not a good variable name, as there's a built-in function called __sum__. More
First-illuminatus
Hi, as phrases is a sequence of strings you don't need str(x) so you could write: ",".join(phrases) More
First-mlucas457
Hi, __str__ is iterable therefore list() is unnecessary. More
First-mlucas457
Hi, why not?: return temp More
First-ZestyPickles
Hi, 1. __str__ is iterable. You could write `alphabet = "abcde...xyz"` 2. or `from string import ascii_lowercase`. More
First-studioj
Hi even it's marked as Creative: To my mind __is not__ is not (:)) the correct comparison here. It should be !=. More
accumulator, for loop, if statement bootlean-jakobEatsCake 1
Hi _chr.isupper()_ returns a boolean value so == True is redundant. More
Using map :)-Yonben
Hi, few things: 1. That `if (i == 0): print('Nope')` is redundant. 2. You could write `if not i: total *= i`. 3. Look at _functools.reduce()_. 4. `newNumber = map(int,str(number))` is enough as _map()_ returns an iterable. More
00-lena-py
Hi, __str__ type is immutable, so it is not the best choice for accumulating values (I mean: `answer += achar`. Look at _filter()_ and _str.join()_. More