31
Olpag
9 27 47
5612/ 5695
Last seen 2 months ago
Member for 5 years, 4 months, 6 days
Difficulty Normal
Best reviews / Newest reviews
... and that's how you use islice.-veky 3 1
## [::(-1)**row] - it's great!! How many wondrous revelations The spirit of enlightment hides! And practice, son of hard mistakes, And genius, friend of paradox, Sorry, no rhyme. An attempt to translate A.S.Pushkin. More
First-kisungch 2 1
try assert fuzzy_string_match("apple", "apples", 0) == False assert fuzzy_string_match("apple", "apxles", 1) == False Use zip_longest instead zip More
First-JCzerny 1 2
I think this solution is more suitable for the section "Creative" More
First-mikaeldovbnia 1 1
can be shorter return len(password) > 6 More
Naive-obone 1 1
clear Instead of this line: for a, b in [(cakes[i], cakes[k]) for i in range(len(cakes)) for k in range(i + 1, len(cakes))] you could use a combinations from itertools : for a, b in combinations(cakes, 2) More
First-Magu 1 1
try assert fuzzy_string_match("apple", "apples", 2) == True condition needs to be changed cnt <= threshold More
Simple DataClass-swagg010164 1
Nice and **short**. IMHO, in one style is better: def money(self): return f'{self.working_years*self.salary*12:,}'.replace(',', ' ') More
First-Pactp 1
try assert fuzzy_string_match("apple", "apples", 0) == False assert fuzzy_string_match("apple", "apxles", 1) == False Use zip_longest instead zip More
dict.setdefault()-msol294 1 1
exactly like my solution )) I just didn't use math.ceil() minutes[date] = minutes.get(date, 0) + int(sec)//60 + bool(int(sec)%60) More
set(text) - set(string)-Olpag
the solution will not pass on the test assert is_all_upper('1 23') == False that's right: def is_all_upper(text): if text := text.strip(): if subset := set(text) - set(string.digits + ' '): return not subset - set(string.ascii_uppercase) re More
Recursion-abelovn
Using recursion is really creative )) More
First-cbudish
You don't need to convert the string to a list. A string is a sequence that can be manipulated directly. You can shorten your code: def backward_string(val: str) -> str: arr = reversed(val) newval = ''.join(map(str, arr)) return newval But an easy way to use slices More
First-kazuki.h 1
test fail in assert is_number("3e4") == False More
second-ssk8
test fail in assert is_number("3e4") == False More
re-U.V
try: assert unix_match('name.txt', 'name[].txt') == False More
First-jiangyang
try: assert unix_match('name[]txt', 'name[]txt') == False More
Simple-CDG.Axel
try: assert unix_match('name2.txt', 'name[].txt') == False And if you change re.search to re.match (because you need match the filename, not search part of the filename) then try again extra test: assert unix_match('[!]check.txt', '[!]check.txt') == True More
First-Maskninja
can be shorter: return len(password) > 6 More
First-Karina_Makiy
can be shorter return len(password) > 6 More
Acceptable Password L First-enumablessing10
can be shorter return len(password) > 6 More
1
2