16
cl0ne
4 16 37
1252/ 1445
Last seen 3 years ago
Member for 4 years, 10 months, 28 days
Difficulty Normal
Best reviews / Newest reviews
First-wbl4126 1
Note that PEP-8 discourages from use of `l` as a name for variables ;) More
Real removing :)-bravebug 1 1
There's no need in `else:` on the 6th line, it doesn't improve readability. You can even put `index + 1 < len(values)` as condition for `while` loop instead of `True` and get rid of the `if...break` completely. More
First-rganelli 1
data[len(data)-1] can be replaced with data[-1] and if len(data) > 1: with if data: More
First-Sim0000 1
You can safely replace `old` with `result[-1]`. More
First-jusha 1
You don't actually need that `p` variable, you can use the last element of the `answer` (`answer[-1]`) More
Easy unpack beginner :)-Valeria_Marin 1 1
It'd be better to put 4th line into if __name__ == '__main__': statement body More
First-bun62 1
Probably it'd be more Pythonic to write `c, v = 0, 0` instead of `c = 0; v = 0`. Names `v` and `c` do not describe purpose of these variables. BTW you can safely replace these variables with a single variable. You don't need `c = 0; v = 0` on line #13, these vars are already contain zero. Given More
First-cactusson 1 1
`str` has `count` method so conversion to `list` is redundant More
Format and Count-obone 1 1
https://www.python.org/dev/peps/pep-0008/ > Always use a def statement instead of an assignment statement that binds a lambda expression directly to an identifier: > > # Correct: > def f(x): return 2*x > > # Wrong: > f = lambda x: 2*x > > The first form means that the name of More
First-____247 1 1
`ans=ans+...` can be safely replaced with `+=...` To return `True` or `False` you don't need `if-else` in `vow` function, you can return `x[y][z] in VOWELS`. `def vow(x,y,z):` is not readable, I'd write something like `def is_vowel(words, word_index, char_index):`. Note that you don't actually ne More
First-logicalladybuglifestyle 1 1
No need in `else: pass` branch (lines 9-10). You can get rid of `if` statement on lines 11-12 just by including 0 in for loop's range (line #3) – just use `-1` instead of `0` for `stop` parameter. BTW you can use `reversed(range(33))` for this purpose. More
First-DaschaBlume
You can get rid of appending `1` on the 6th line if you change loop condition (3rd line) to `while number != 0:` (or even to `while number:`). Same goes for reversing the string: just prepend instead of appending (`binary = str(number % 2) + binary` on the 3rd line). More
First-TheSelfAtu
no need in conversion to `str` for value returned by `bin`, it already returns `str` More
First-jacobsxd
You don't need to convert value returned by `bin` – it already returns `str`. More
First-Shota_Oshimi
Please, use some spacing around operators to increase readability of your code (see more about general coding style recommendations in [PEP-8](https://www.python.org/dev/peps/pep-0008/#other-recommendations)), e.g. `count += 1` is more readable than `count+=1`. If you change loop's condition (line More
Second-Stepan__Timetsky 1
I have only some style-related notes according to [PEP-8](https://www.python.org/dev/peps/pep-0008/#comments): > Block **comments generally apply to** some (or all) **code that follows them**, and are indented to the same level as that code. BTW comments in English are preferred (even though I kn More
First-Phil15 1
https://www.python.org/dev/peps/pep-0008/ > Always use a def statement instead of an assignment statement that binds a lambda expression directly to an identifier: > > > > # Correct: > def f(x): return 2*x > > # Wrong: > f = lambda x: 2*x > > The first form means that t More
First-B_dur 1
I guess `return "." not in line and len(set(line)) == 1` is more readable than explicitly specifying `True` and `False` values. BTW you don't need to convert `set` to `list` here as well, `set` implements `__len__` method so `len` function can be applied to `set` instances. I'd replace repeated use More
First-______71
You can rewrite ```python if phrase[i+c] == " ": d += phrase[i+c] elif phrase[i+c] in VOWELS: d += phrase[i+c] c += 2 else: d += phrase[i+c] c += 1 ``` as ```python d += phrase[i+c] if phrase[ More
First-reallyz
> from operator import itemgetter is not used More
1
2