36
Last seen 2 days ago
Member for 2 years, 2 months, 13 days
Difficulty Easy
Converting dates is not needed at all. It's as simple as:
get_latest = max
More
It's new for me this original using of __ __import__ __ . I put this trick in my collection !
More
This solution is NOT SPEEDY !
It is 50 times slover then another speedy solution of
## maybe First ##
(https://py.checkio.org/mission/team-play-2/publications/maybe/python-3/first/?ordering=most_voted&filtering=all)
More
Using recursion in this case is not effective. This solution have only educational and practice goal in resursion.
More
Yours solution was suggested for random rewiew as **SPEEDY** solution and i will discuss speedy aspects.
1. Solution will be more speedy if use walrus operator in multiple **pow()** operations.
while pow(x,x)< number:
x +=1
root_num = 0
if pow(x,x)==number: retur
More
I have checked solution and get assertion error at test
assert decode_vigenere(u"AAAAAAAAA", u"ABABABABC", u"ABABABABC") == "AAAAAAAAA", "ABABABABC"
where valid key is "ABABABABC", but not "ABAB"
More
Lines 5-10 : better to set all items of **table** to **price+1** and clear table[0]
table = [price+1 for i in range(price + 1)]
table[0] = 0
Line 13 and later: Value **j** is not neded since everywere is used **denominations[j]**
for denomination in denominations:
More
In my mind
mines = sum(t[2]==9 for t in neighbors)
looks better and clearer than
mines = sum(1 for t in neighbors if t[2] == 9)
More
It's more elegant to use **** in line 11
for i, column in enumerate(, start=1):
. . .
return [pos+1, i, pos+len(word), i]
against
for i, column in enumerate())):
. . .
return [pos+1], i+1, pos+len(word), i+1]
since **i** now is agree
More