16
Last seen 4 years ago
Member for 5 years, 6 months, 29 days
Difficulty Normal
I wonder how does this sorting works? How does it possible to sort a list with a key - lambda expression that returns a tuple for each element?
More
Hello, I like your solution but I have got troubles to understand this part:
d1 = list(filter(lambda n: lit_left <= n <= lit_left | broken_left, NUMS))
d2 = list(filter(lambda n: lit_right <= n <= lit_right | broken_right, NUMS))
I wonder if you might be able to help me understand how your
More
Recursion is a good tool for this mission. I have did something similar here [Recursive scan](https://py.checkio.org/mission/calculate-islands/publications/Denis_Gerashchenko/python-3/recursive-scanning/)
More
As I heard from Socratica channel, oneliners are interesting to write but less fun to read
More
Clear one, but maybe it's a better choice to use the readable variable names? Like a 'character' instead of a char and a 'count' instead of a cnt.
More
It's nice and clear. Looks exactly as I wanted to solve it before laziness got me and I googled ready solution just not to type the formulas in an editor xD
More
It's nice and clear.
Mine first solution was waaaaay more complicated and stupid.
More
I know about this unpacking
# Function argument unpacking
def myfunc(x, y, z):
print(x, y, z)
tuple_vec = (1, 0, 1)
dict_vec = {'x': 1, 'y': 0, 'z': 1}
myfunc(*tuple_vec)
1, 0, 1
myfunc(**dict_vec)
1, 0, 1
More