40
suic
16 39 57
9966/ 10664
Last seen 1 day ago
Member for 9 years, 11 months, 4 days
Difficulty Advanced
Best reviews / Newest reviews
First-illuminatus
Hi, as phrases is a sequence of strings you don't need str(x) so you could write: ",".join(phrases) 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-metallidog 1 1
Hi, the lambda superfluous. In this case you could write: return sorted(number_array, cmp=abs) 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-spoty 1
Why not _c.isalpha()_ instead of _c in ascii_lowercase()_? :) More
First-bednya
addspace() is like Space() in VB.NET. Why not " ".join()? Semicolon?!? More
Simple dict-DiZ 1
_d_ is superfluous. As a one-liner it would be "more creative". :) More
array-bobriko
This could be a cool one-liner, if you omitted _pattern_ and changed def to lambda. [Here](http://www.checkio.org/mission/fizz-buzz/publications/suic/python-3/bobrikos-one-lines/) it is. Thanks for inspiration. More
First-ira 1
Hi, you don't need to import math power, because ** is the same, so: return int(array[n] ** n) More
First-ira 1
Hi, you can remove lines 6 and 15 and replace _msg =_ with _return_. More
while_robot-spoty 1
Hi, you can omit if r else "" as "".join([]) is "". :) More
This was interesting parsing-brandon.helms.35
Hi, just one thing: On lines 20, 21 _False_ can be used instead of _None_. After that you can simplify lines 25, 28 e. g: letter in WOVELS and not vow # instead of: letter in VOWELS and vow in [False, None] More
Quick Answer-brandon.helms.35
Hi, this solution is fine. I have two comments: 1. It's a common "beginner's design pattern" :) # to use: if x: return True else: return False # instead of: return x 2. Line two contains three times the same pattern (_and re.(someregex, data)_) => dupli More
Monkey typing-IrinaNizova
I've been playing a bit more with your solution and I've come up with [this](http://www.checkio.org/mission/monkey-typing/publications/suic/python-3/another-one-liner/). Thanks for inspiration. More
First-IrinaNizova
Good! Only the parentheses around bin(number) are superfluous. More
First-IrinaNizova
Hi, str.isalpha would be more suitable for this task than chr(). More
Monkey typing-IrinaNizova 1 1
Hi, in fact there's no problem with solution. You could shorten it a bit :) 1. You don't the if part of the list comprehension as True == 1 and 0 == False. 2. And as you don't use _s_ anywhere else omit the s variable: return sum([text.lower().count(word) for word in words]) More
First-alexsoft2011
Hi, You probably forgot to remove return True or False. You could also clean up your code a bit. There are a few "beginner design patterns" :) 1. This is quite common: return result # is the same as if result: return True else: return False 2. In a More
First-alexsoft2011 1
Hi, you can remove the last line as it's never reached. More
First-alexsoft2011
Hi, two things: 1. This is unnecessary: if a % 3 != 0 and a % 5 != 0: return "{}".format(a) # The a % 3 != 0 and a % 5 != 0 is met at that point. 2. The standard way of convert something to string is simply using __str__(x). So you could write: return str(a) # More