31
Cjkjvfnby
10 30 43
5274/ 5695
Andrey Solomatin
Last seen 1 year ago
Member for 11 years, 2 months, 8 days
Difficulty Normal
Best reviews / Newest reviews
First-jcg
\# in real life use module re This life is quite real :) https://docs.python.org/2/library/stdtypes.html#str.isalpha No need to add branch with nothing. else: # optionnal continue # explicitly do nothing You can use enumerate instead of range. More
Now I want to play Triominos-maurice.makaay 1
No need braces on line 5 _placements is same as permutation _all_possible_scores return tuple of two args, but second is not used comment in line 23 can be placed in docstring **have_seen_equivalent_for** return True or None generator expression is too huge More
First-tobixx
You docstring does not fits python preffered style. More
First-ParadisiacMercy
str = '' -> shadow builtin function if Num < 1 or Num > 3999: This check is not required. It makes code more bulky. (Num, modNum) = divmod(Num, 10) -> Num, modNum = divmod(Num, 10) numToRomanNum and checkio are two functions that do same job. It is bad design. read about PEP8 More
First-charleshightower
don't publish code with debug prints use string formating not + read about PEP8 More
Pod_proteinom-un1acker
'0'+str(data1[0]) use str.zfill or str.ljust str(data1[0]) string is already string use string formating not + read PEP8 More
First-redsheep
read about PEP8 and string formating More
bfs-parmando 1
map isbad name for function argument, it shadows built in function. unpacking will make code more clear # map[place[1]][place[0]+1] y, x = place map[y][x+1] You don't change finished flag, remove it and use while True You don't follow python style guide (PEP8) Remove u More
First-k0mpjut0r
you can use %=, all math signs support that sintax More
First-Gunther
you can save one line changing res= to return More
First-madmanbob 1
you can move call upper() to checkio function text = text.upper() More
First-nikita.marchenko
You replace letters with digit and digit with letters :) More
First-chadheyne
Format string and add string to it is terrebly wrong: "[{0}]{{2,}}".format("test") "[%s]{2,}" % "test" Converting text to upper before any action will make other code more easy. More
list[#::2]-Zanzacar 1
You can call pattern.match. And change if-else section to return. Every time you see code **if True: return True** think if it possible to replace it with return statment. def letterCheck(argStr1, argStr2): vowPattern = re.compile('^[AEIOUY]+$') conPattern = re.compile('^[BC More
First-floord
You function has side effects (mutate input data). It is better to create new list and return it. **Pure functions** are more easy for debug and support. More
Trigonometry-PositronicLlama
**sorted** Return a new sorted list from the items in iterable. http://docs.python.org/3.3/library/functions.html#sorted More
First-Thomas35
You can pass only one argument to range # range(0, c, 1) range(c) More
First-kraken
Please follow style recomended in [PEP8](http://www.python.org/dev/peps/pep-0008/) More
First-BlackOpSix
Using random is bad idea. This code has chance to fail. More
Using +-veky 1
It can be done shorter, just remove + More
1 2 3 4 5 6 7 8 9
10
11 12 13 14 15