May 1, 2024, 3:35 p.m. |
+ 5 |
for
stack-Phil15
|
April 30, 2024, 12:41 a.m. |
+ 1 |
for
First-lechrudik
|
March 16, 2024, 6:46 p.m. |
+ 4 |
for
First-tokiojapan55
|
March 12, 2024, 3:14 p.m. |
+ 1 |
for Comment
kdim: pretty "num>0", otherwise nothing to add
|
March 12, 2024, 3:13 p.m. |
+ 1 |
for Comment
kdim: it's time to use f-string
|
Feb. 29, 2024, 3:23 p.m. |
+ 1 |
for Comment
maelnor: Hah :) Perhaps because I'm here often when I get tired of writing "clean, readable and maintainable"...
|
Feb. 29, 2024, 1:05 a.m. |
+ 1 |
for
First-Tinus_Trotyl
|
Feb. 27, 2024, 8:41 p.m. |
+ 1 |
for
Oneliner-maelnor
|
Feb. 18, 2024, 10:31 a.m. |
+ 1 |
for Comment
adamspj: Wow, this was mind-bending for me because I'd never before tried using logical "and" and "or" betwee...
|
Feb. 18, 2024, 10:26 a.m. |
+ 3 |
for
Can it be done more simply than this?-adamspj
|
Jan. 15, 2024, 8:08 p.m. |
+ 1 |
for Comment
arthur.antonoff: Very nice! Great use of x*y for verify when x and y are just in different directions
|
Jan. 6, 2024, 8:05 p.m. |
+ 1 |
for Comment
przemyslaw.daniel: right side is bottom of the flask
|
Dec. 28, 2023, 9:06 p.m. |
+ 1 |
for Comment
waffell: You have one mistake, one of the conditions is: "the length should be bigger than 6". If you check a...
|
Dec. 11, 2023, 6:21 p.m. |
+ 1 |
for Comment
Phil15: `a op b` apparently
|
Dec. 9, 2023, 11:04 a.m. |
+ 1 |
for Comment
Ivan_Malashenko: good solution! it has been taken few minutes to understand how it works.
|
Oct. 6, 2023, 7:45 p.m. |
+ 1 |
for Comment
sergray: There's no need to provide `Counter` a list built with list comprehension. It perfectly operates on ...
|
Aug. 24, 2023, 10:13 a.m. |
+ 1 |
for Comment
Phil15: cookie_monster([11, 26, 37, 44, 49, 52, 68, 75, 87, 102]) Yours: [37, 31, 15, 12, 7, 4] Mine: [87, 3...
|
Aug. 15, 2023, 1:26 p.m. |
+ 1 |
for Comment
TheRing: No, I meant to explicitly list them as pairs, as you wrote. Maybe it´s just a matter of taste - me p...
|
July 16, 2023, 7:40 p.m. |
+ 1 |
for Comment
Phil15: Me too, so to easily fix my function, I made a "queen"-generalization.
|
July 12, 2023, 1:36 a.m. |
+ 1 |
for
Cached tiling counts-Phil15
|
May 14, 2023, 3:09 p.m. |
+ 1 |
for Comment
dig: Thank you Amandel for this post, you are absolutely right! Later I will include a new test and chang...
|
April 30, 2023, 2:07 p.m. |
+ 1 |
for Comment
vova1238: Using bare excepts (without specifying an exception type) is bad practice and may couse problems lat...
|
April 30, 2023, 11:35 a.m. |
+ 1 |
for Comment
Max0526: Genius! # will stick to integer arithmetic only --> +1. Also, +1 for side2 instead of side almost in...
|
April 26, 2023, 7:54 p.m. |
+ 1 |
for Comment
TheRing: Damn... I didn't know about the builtin bin() function, so I implemented the binary weight calculati...
|
April 26, 2023, 12:37 a.m. |
+ 1 |
for Comment
Max0526: Using **p** instead of function parameter **password**. Genius tip to save space!
|
April 25, 2023, 10:39 p.m. |
+ 1 |
for Comment
Max0526: Nice use of zip! d = {} works here too.
|
April 21, 2023, 11:27 a.m. |
+ 1 |
for Comment
matthewwdaly: This feels more suited for Creative than Clear. Still, I trust that it works.
|
March 18, 2023, 11:47 a.m. |
+ 1 |
for Comment
egkrivotuloff: for '123456' you should return False, not True
|
March 13, 2023, 1:24 a.m. |
+ 4 |
for
14-liner: easily up to 10**100-przemyslaw.daniel
|
March 11, 2023, 11:09 p.m. |
+ 1 |
for
formula with bit_count()-juestr
|
Feb. 9, 2023, 9:18 a.m. |
+ 3 |
for
First-Moff
|
Jan. 27, 2023, 9:48 p.m. |
+ 1 |
for Comment
lisovsky: This expression is cool: (name in w and w[name]) and you can solve this problem like this: result[ke...
|
Jan. 26, 2023, 9:54 p.m. |
+ 1 |
for Comment
veky: An interesting observation: space obviously cannot be O(1), since the numbers (x, y, f and F) get bi...
|
Dec. 31, 2022, 2 p.m. |
+ 1 |
for Comment
kt1729: sorted(values, key = abs) works, although the lambda function works too.
|
Nov. 10, 2022, 7:20 p.m. |
+ 1 |
for Comment
Kolia951: Nice using of fresh function pairwise()!
|
Oct. 23, 2022, 10:10 p.m. |
+ 3 |
for
First-mortonfox
|
Oct. 23, 2022, 10:09 p.m. |
+ 3 |
for
get, union-Sim0000
|
Oct. 23, 2022, 10:06 p.m. |
+ 2 |
for
Second-tokiojapan55
|
Oct. 23, 2022, 5 p.m. |
+ 2 |
for
re, fullmatch, escape-kdim
|
Oct. 23, 2022, 12:09 p.m. |
+ 1 |
for
First-ssk8
|
Oct. 21, 2022, 9:04 p.m. |
+ 1 |
for
No need to convert-Selindian
|
Oct. 21, 2022, 8:59 p.m. |
+ 2 |
for
First-imloafer
|
Oct. 17, 2022, 10:33 a.m. |
+ 4 |
for
Third-zongareight
|
Oct. 16, 2022, 9:59 p.m. |
+ 2 |
for
Second-zongareight
|
Oct. 16, 2022, 12:04 p.m. |
+ 2 |
for
First-zongareight
|
Oct. 16, 2022, noon |
+ 3 |
for
First-lisovsky
|
Oct. 16, 2022, 11:53 a.m. |
+ 2 |
for
First-mikaeldovbnia
|
Oct. 15, 2022, 8:12 p.m. |
+ 1 |
for Comment
mu_py: @amandel @phil15 Thank you for your prompt answers. Guess my question wasn't clear enough. I plan to...
|
Oct. 10, 2022, 1:08 a.m. |
+ 2 |
for
Second-imloafer
|
Oct. 5, 2022, 10:20 a.m. |
+ 1 |
for Comment
veky: As said, it was long time ago, I think it was originally written in Py2 even. But an important point...
|
Oct. 2, 2022, 10:55 a.m. |
+ 1 |
for Comment
mithilkotak: Your solution can be turned into a compact one-liner: def sum_digits(num:int)->int:return 0 if not n...
|
Oct. 1, 2022, 8:08 p.m. |
+ 1 |
for Comment
juestr: You could replace the first inline-if too: return num and (num % 9 or 9)
|
Sept. 30, 2022, 10:27 p.m. |
+ 3 |
for
[0] * items.count(0)-flpo
|
Sept. 30, 2022, 10:25 p.m. |
+ 2 |
for
POP-APPEND-U.V
|
Sept. 30, 2022, 10:23 p.m. |
+ 1 |
for Comment
mithilkotak: This is also creative but what if a=[1,4,6] and b=[1,3,6]. I think your function will return 1 where...
|
Sept. 27, 2022, 11:30 a.m. |
+ 1 |
for Comment
rybld2: simply great! This python is fantastic!
|
Sept. 17, 2022, 7:22 p.m. |
+ 3 |
for
First-mortonfox
|
Sept. 17, 2022, 7:18 p.m. |
+ 2 |
for
Second-kazuki.h
|
Sept. 12, 2022, 7:23 p.m. |
+ 3 |
for
First-freeman_lex
|
Sept. 12, 2022, 7:20 p.m. |
+ 3 |
for
more-itertools import + 1-liner-Phil15
|
Sept. 12, 2022, 7:15 p.m. |
+ 2 |
for
Explained - Kept simple-Selindian
|
Sept. 11, 2022, 7:21 p.m. |
+ 4 |
for
use heapq-kdim
|
Sept. 11, 2022, 7:11 p.m. |
+ 4 |
for
First-mortonfox
|
Sept. 11, 2022, 12:03 p.m. |
+ 3 |
for
one line, one or, no and-Kosya
|
Sept. 10, 2022, 9:40 p.m. |
+ 1 |
for
First-Doppelok
|
Sept. 1, 2022, 2:05 a.m. |
+ 1 |
for Comment
Phil15: @Doppelok Function signature change: def int_palindrome(number: int, base: int) -> bool: ^^^^^^^^^^^...
|
March 18, 2021, 7:53 p.m. |
+ 3 |
for
use of datetime module-ypypjay
|
March 18, 2021, 7:53 p.m. |
+ 1 |
for
First-MarcAureleCoste
|
March 18, 2021, 7:51 p.m. |
+ 1 |
for
First for "Days Between"-olgag
|
March 17, 2021, 7:28 p.m. |
+ 1 |
for Comment
Andrz: Nice work. Do not foget to use symbol **r** before template (i.e. r"\w+('\w)?") :)
|
March 11, 2021, 6:33 p.m. |
+ 1 |
for
First-ElifED
|