8
Lightras
2 22
290/ 345
Last seen 4 years ago
Member for 7 years, 2 months, 13 days
Difficulty Normal
Best reviews / Newest reviews
First-ttyszk 1
Well done. But you could use built-in sorted() or list.sort() functions More
First-skilleter 1 1
\+ for adding comments!!! You could use methods letter.[islower()](https://docs.python.org/2/library/stdtypes.html?highlight=islower#str.islower)(Your link address here…) / .isupper() / .isnumeric instead of conditions like ('a' <= letter <= 'z') More
No conversion to string. Only number operations.-Sqverl
wow, that's a nice way to iterate over a numeric object! Thanks =) More
#SIMPLE CODE-gunhwan0118 1
I was one step to implementing the same solution when I decided that it's gonna be too complex. Then I went reading the documentation and accidentally found that the int(str_number, radix) does exactly what we need here! But with incorrect input it throws an exception, so our task was to catch it. More
First-Taga_Mukail 1
why do you check 'if "right" in i' before replace()? replace() performs this check too =) More
First-weirdquark 1
Huh, that's and interesting way to form the result =) This makes your solution cool because we can replace the game's words with any other 4-letter words, and your program will work correctly More
First-Lightras
I was trying to create a single super-regexp but failed. The best solution I found was '[a-z].\*[A-Z].\*[0-9]' regex, but it works only if the order of chars is the same (e.g. 'aH9' but not 'Ha9') I could use some hint here More
Head, *body and tail.-Tinus_Trotyl 1
oh my... this head/body/tail unpacking mechanism looks like a pure magic for me! Learnt something new, thanks More
The most-Nikitoz_mariupol
btw, we have nice built-in functions to get max and min element from collection: max(args), min(args) More
First-troglodyte
Nice. I used similar approach - find starting after first occurence. But I forgot to use second parameter of find function, and cropped the initial string. You did better here =) More
First-hamaccho1009.public 1
you could place "count > 2: break" as a first check in your loop. Why would you check anything else if you already have 3 on your counter, right? =) More