45
bryukh
16 32 48
15857/ 17173
Valentin Bryukhanov http://bryukh.com/
Last seen 2 years ago
Member for 11 years, 7 months, 23 days
Difficulty Normal
Developer, engineer and taskMaker.

Best reviews / Newest reviews
set default and sort-kendriu
for c in text.lower(): if c.islower(): I understand why do you use "islower", but for first glance it looks weird :-) "isalpha" will be better here, just for readability. More
I thought dictionaries would be a good approach-p1co
if x.isalpha() is False: Why do you use this construction? text = list(phrase.lower()) "list" is redundant operation here. line 7-10 can be simpler, even if you don't like "setdefault" or default dicts: countDict[x] = countDict.get(x, 0) + 1 More
Generator-yoichi 1
Please, don't use "l" as a variable name. More
Pearls-hanpari 1
Just a question - why do you use indents in line 2? More
First-jcg
+1 for the solution and +2 for the scheme. More
BFS-veky 1
Veky? Clear? What is going on? More
Lovely prints-Alexis_Bourgoin
And you can use triple quotes and make this without \n More
First-loic2295
"l" is not good name for variables - because it looks like "1" or "I" for many fonts and hard readable. if l % 2 != 0 : can be simpler: if l % 2: Your code is good, but PEP8 and good variables name can make nice code from it. More
Iterate zyx...-jrobbin5
Nice code. You can make a micro-optimisation with letter_count = text.count(letter) With that you don't need count this twice. More
First-Codenburger
Lines 11-12 and "b" variable are redundant. More
First-atzeatze
copyOfData = data For lists it's not a copy, you just created one more link for the same array. If you will change one, then you will change other. You can count elements with the method "count" [1, 2, 3, 1, 1].count(1) # return 3 More
Very ugly solution , I wish I can do better-ahmedaswai
Whitespaces can be useful. PEP8 can make your code is more readable. And "Counter" here is overkill, I think. But I sure you can make this pretty and more simpler. More
Xs and Os Second -cgallant
Sometimes you are using spaces around operators, sometimes - not. Not bad and if you will make it more "general" then it will be nice solution. More
Dijkstra (no fib-heap => O(n^2))-MorrisFeist
Why do you use class here? They look like simple dictionaries here. More
Touch the right wall-maurice.makaay 1
Not universal, but funny :-) And I like "properties". Nice! More
First-undead404 1
Change input data is not a good practice. You can use work = sorted(data) instead line 6-7 amount = len(data) line 9 is overhead if amount % 2: # the same as amount % 2 != 0 and line 13 is not needed. More
Dijkstra-Complete-Miaou 1
Nice comments, but too long lines. More
complex>complicated-veky 1
1e-9??? AAAAA, what is it? Why, why are you breaking my brain. :-D More
First-davidpm 2
" == True" is redundant. "range(0, len(list_of_words))" -- 0 is default, so you can use range(x) == range(0, x) And you can iterate through list instead indexes: for w1 in list_of_words: for w2 in list_of_words: More
Assignment-veky 1
A cool trick with the double assignment. More
1 2 3 4 5 6
7
8