June 9, 2018, 9:29 a.m. |
+ 1 |
for Comment
hanpari: Great question. F# didnt make it what is extremely pity. This is why I gave up while I still believe...
|
June 8, 2018, 8:02 p.m. |
+ 1 |
for Comment
Marcelo_Ozorio: Nice, avoiding if statement by using max(default = 0). Excellent.
|
June 7, 2018, 3:27 p.m. |
+ 1 |
for Comment
oduvan: but solutions give you understanding of what else you can learn :)
|
May 31, 2018, 11:43 p.m. |
+ 1 |
for Comment
przemyslaw.daniel: Nothing is what it seems... MORSE = {'.-': 'a', '-...': 'b', '-.-.': 'c', '-..': 'd', '.': 'e', '..-...
|
May 30, 2018, 9:28 p.m. |
+ 1 |
for Comment
veky: Compared to [what](https://py.checkio.org/mission/bigger-price/publications/veky/python-3/connecting...
|
May 29, 2018, 6:59 p.m. |
+ 1 |
for Comment
veky: Yeah... it's too bad that because of Python's functional programming fear we don't have functools.co...
|
May 24, 2018, 12:08 p.m. |
+ 1 |
for Comment
lisfer: Hey! Greate job! I just have two comments: Actually, we instead of making clause like if : return Tr...
|
May 13, 2018, 3:46 p.m. |
+ 1 |
for Comment
crazychemistry474: Short but very efficient when the list went large.
|
May 1, 2018, 8:50 p.m. |
+ 1 |
for Comment
veky: Hm... actually, you _did_ create something: a bound method. :-) You can verify it with: >>> f, g = '...
|
May 1, 2018, 8:32 p.m. |
+ 1 |
for Comment
alexander.gorelyshev: ...I would invite you to take advantage of the beautiful Pythonic list slices: all you need to sum u...
|
April 24, 2018, 11:58 a.m. |
+ 1 |
for Comment
jtokaz: Good. Since "len(set(elements))>1" is a bool you can return it directly. You could return "not len(s...
|
April 17, 2018, 6:12 a.m. |
+ 1 |
for Comment
kurosawa4434: It's elegant solution :) I think that using 'str.maketrans()' is more readable. Line 13: for word in...
|
April 14, 2018, 6:42 p.m. |
+ 1 |
for Comment
jtokaz: Python has slicing similar to Matlab, e.g. array[::2]. Also in Python, any object can be tested for ...
|
April 2, 2018, 4:11 p.m. |
+ 1 |
for Comment
StefanPochmann: You [reinventor](https://github.com/python/cpython/blob/de7a2f04d6b9427d568fcb43b6f512f9b4c4bd84/Obj...
|
March 28, 2018, 12:09 p.m. |
+ 1 |
for Comment
StefanPochmann: Yeah, I saw that. It's one of the reasons for hiding it in "Uncategorized" :-)
|
March 23, 2018, 2:06 p.m. |
+ 1 |
for Comment
narimiran: Not nearly enough cases.... See [here](https://py.checkio.org/mission/fizz-buzz/publications/jesaisp...
|
March 23, 2018, 2:05 p.m. |
+ 1 |
for Comment
loonydevil: damn, you're my hero :)
|
March 22, 2018, 3:40 p.m. |
+ 1 |
for Comment
flpo: Hi & thanks for the compliment! Sure, first at all you should consider that ["The set of all Turing ...
|
March 19, 2018, 3:25 p.m. |
+ 1 |
for Comment
veky: "<=1" was too much to ask? :-P
|
March 15, 2018, 3:43 p.m. |
+ 1 |
for Comment
bryukh: Do you know what `set` data type is?
|
March 5, 2018, 9:58 a.m. |
+ 1 |
for Comment
veky: Why not simply "return l == list"? Lists are equal, not only their lengths.
|
March 1, 2018, 6:06 p.m. |
+ 1 |
for Comment
Sim0000: I think this is a bit overkill. I think this task has too many exceptions and is not fun. At least, ...
|
March 1, 2018, 2:52 p.m. |
+ 1 |
for Comment
Brda: Wow!! if array: return sum(array[::2]) * array[-1] else: return 0
|
March 1, 2018, 2:52 p.m. |
+ 1 |
for Comment
Brda: Wow again!! How deep Python is!! return sum(array[::2]) * array[-1] if array else 0
|
Feb. 27, 2018, 7:23 p.m. |
+ 1 |
for Comment
veky: Of course. The main criterion for including something in the Python stdlib is that the algorithm is ...
|
Feb. 27, 2018, 6:41 p.m. |
+ 1 |
for Comment
Tinus_Trotyl: Whow . . . NICE . . . ! ! ! You did what I looking for (connecting an logical output value to add/di...
|
Feb. 27, 2018, 4:51 p.m. |
+ 1 |
for Comment
macfreek: Why reinvent the wheel? https://docs.python.org/3/library/difflib.html#difflib.SequenceMatcher.find_...
|
Jan. 9, 2018, 10:49 p.m. |
+ 1 |
for Comment
DahliaSR: Same! :D
|
Jan. 3, 2018, 3:47 p.m. |
+ 1 |
for Comment
Tinus_Trotyl: **HEY, COOL :-)** Some more number facts: 2018 = 2 (prime) x 1009 (prime) 2 + 0 + 1 + 8 = 11 (prime)...
|
Jan. 3, 2018, 3:47 p.m. |
+ 1 |
for Comment
Sim0000: Happy new year. 2018 is the sum of squares of 12 consecutive numbers. **sum((7+i)\*\*2 for i in rang...
|
Jan. 1, 2018, 9:06 a.m. |
+ 1 |
for Comment
DahliaSR: Nice. Using _itertools.isslice()_, instead of slice notation, would also decrease the auxiliary spac...
|
Dec. 20, 2017, 8:14 a.m. |
+ 1 |
for Comment
Sim0000: I use it to avoid flags when I find something. for loop-condition: ... if some-condition: break ... ...
|
Dec. 6, 2017, 9:27 p.m. |
+ 1 |
for Comment
flpo: I think you can start your research from these :) https://bugs.python.org/issue1660179 https://bugs....
|
Nov. 28, 2017, 3:16 p.m. |
+ 1 |
for Comment
hanpari: What about left side slides for inplace replacement? listy = list(range(7)) listy[:3] = 0, 0, 0 list...
|
Nov. 21, 2017, 9:09 p.m. |
+ 1 |
for Comment
flpo: Thanks! Nice codegolfish, but in that case I'd rather to spend a single more char but keep consisten...
|
Nov. 18, 2017, 2:33 p.m. |
+ 1 |
for Comment
flpo: Hi, I know that this is a creative solution but the positional argument inside the string are simply...
|
Nov. 17, 2017, 9:03 p.m. |
+ 1 |
for Comment
StefanPochmann: Lol... so reply-by-email does work, and really does allow me to give +5, instead of just +1 like I c...
|
Nov. 15, 2017, 5:10 p.m. |
+ 1 |
for Comment
veky: Next time someone tells me Python is a functional programming language, I'll show them this. :-DD
|
Nov. 13, 2017, 12:06 a.m. |
+ 1 |
for Comment
przemyslaw.daniel: This one is ok and deserves to be in clear category. It could be made a little bit shorter by using ...
|
Nov. 12, 2017, 2:17 p.m. |
+ 1 |
for Comment
veky: Yup. For homework, meditate on the difference between *a, = b and a = *b, ;-D
|
Nov. 5, 2017, 6:27 p.m. |
+ 1 |
for Comment
veky: > Python itself doesn't have a native array data structure Where do you get such ideas? `array.array...
|
Oct. 17, 2017, 10:41 p.m. |
+ 1 |
for Comment
veky: Seriously, no mention of printing an output instead of returning it from a function? It's easily hal...
|
Oct. 14, 2017, 4:42 p.m. |
+ 1 |
for Comment
przemyslaw.daniel: +1 for perfect obfuscation of such a simple task :-)
|
Oct. 14, 2017, 8:35 a.m. |
+ 1 |
for Comment
veky: Both of them use `__slots__` in order to prevent namedtuple-inherited classes to acquire a `__dict__...
|
Sept. 30, 2017, 8:55 a.m. |
+ 1 |
for Comment
veky: ROTFL. C-argo C-ult, in a way. :-D
|
Sept. 27, 2017, 7:54 a.m. |
+ 1 |
for Comment
hrvoje: Very cool use of string.join('()'). It does remind of a female body part, though. Naughty Veky. :)))
|
Sept. 4, 2017, 3:43 p.m. |
+ 1 |
for Comment
veky: I know what happens there, of course. I don't know what "it doesn't work like this" means. :-P So, w...
|
Aug. 16, 2017, 6:57 a.m. |
+ 1 |
for Comment
veky: Here's more about [Py3](https://py.checkio.org/mission/weak-point/publications/veky/python-3/factore...
|
July 28, 2017, 8:42 a.m. |
+ 1 |
for Comment
ciel: I also thought this was an educational mission, but recent twisted test case has made this less educ...
|
July 2, 2017, 7:25 a.m. |
+ 1 |
for Comment
veky: Your definition "List is completely empty when all list inside of this list are empty." is in fact w...
|
June 30, 2017, 8:52 p.m. |
+ 1 |
for Comment
veky: > Default “Clear” category means that you share clean and well written code that is easy to read. No...
|
June 24, 2017, 8:47 a.m. |
+ 1 |
for Comment
PythonWithPI: I tried to do this, but it wasn't working. Good solution!
|
May 23, 2017, 8:21 a.m. |
+ 1 |
for Comment
veky: Of course. You would get more thumbs if you imported from stdlib. ;-]
|
May 10, 2017, 11:18 a.m. |
+ 1 |
for Comment
veky: "Pythonic" is not the same as "should be part of Python stdlib". There are many perfectly Pythonic p...
|
May 9, 2017, 4:33 p.m. |
+ 1 |
for Comment
veky: Of course. I just said, if you already have a lambda, why not have another? :-)
|
May 8, 2017, 5:09 p.m. |
+ 1 |
for Comment
veky: Since so many people here adore your solution, I won't spend too much words about how beautiful it i...
|
May 7, 2017, 12:39 p.m. |
+ 1 |
for Comment
veky: Worth liking, maybe. In a "Clear" category, no. Anyway, there is a way to avoid resorting: you just ...
|
May 5, 2017, 8:03 a.m. |
+ 1 |
for Comment
veky: Thanks. Many people forget Python has native support for complexes. I program for about 30 years, an...
|
May 3, 2017, 7:49 a.m. |
+ 1 |
for Comment
narimiran: Instead of defining the lambda function for a key, there's a simpler solution that serves the same p...
|
May 3, 2017, 7:48 a.m. |
+ 1 |
for Comment
narimiran: There are several things that can be learnt/improved here: 1. I already mentioned in one other your ...
|
April 22, 2017, 10:40 a.m. |
+ 1 |
for Comment
veky: The last solution has no place in hints. Please don't promote filtering lambdas. Generator expressio...
|
April 19, 2017, 11:35 p.m. |
+ 1 |
for Comment
DahliaSR: Clear! You can improve your solution by apllying the [EAFP coding style](https://docs.python.org/3/g...
|
April 16, 2017, 11:28 p.m. |
+ 1 |
for Comment
DahliaSR: Very complicated and lots of redundant expressions. - Line 12: a = n What for? You are not reusing t...
|
April 12, 2017, 4:31 p.m. |
+ 1 |
for Comment
DahliaSR: `[i for i in range(-10, 10)]`: this is a list-comprehension and resturns a list `(abs(i) for i in ra...
|
March 11, 2017, 11:52 a.m. |
+ 1 |
for Comment
kadir.dmr: shuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
|
March 11, 2017, 11:52 a.m. |
+ 1 |
for Comment
jannidis: (1), (2) and (5) and (7): important libraries like numpy or pandas etc.
|
March 11, 2017, 11:52 a.m. |
+ 1 |
for Comment
shaunanderson5: I would like to see some missions that are more helpful for the beginner programmer, the concept ser...
|
March 11, 2017, 11:52 a.m. |
+ 1 |
for Comment
jocow: I would like to see more architectural missions ? See my other posts related to this
|
March 11, 2017, 11:52 a.m. |
+ 1 |
for Comment
Sulverus: I would like to see problems about distributed algorithms: gossip, paxos, raft
|
Feb. 28, 2017, 8:57 a.m. |
+ 1 |
for Comment
veky: Whenever you try to write some new functionality, stop. And think, of the enormous number of Pythoni...
|
Feb. 28, 2017, 8:57 a.m. |
+ 1 |
for Comment
kot0begemot: Wow, you just reinvented a bicycle! :) There is a built-in int() in Python that can use radix as a s...
|
Feb. 11, 2017, 4:10 p.m. |
+ 1 |
for Comment
veky: BTW Tangentially relevant: https://pbs.twimg.com/media/CouOwSdW8AAXrkF.jpg:large ;-D
|
Feb. 9, 2017, 11:17 p.m. |
+ 1 |
for Comment
ned2: For each element in data it does element.count(), which requires a sequential scan of the whole inpu...
|
Jan. 24, 2017, 11:15 a.m. |
+ 1 |
for Comment
oduvan: :) now we should have "3rd party Creative" category
|
Jan. 8, 2017, 9:49 p.m. |
+ 1 |
for Comment
DahliaSR: Wow, this one is scary! + the readability of this is bad while True: if flist[len(flist)-1] > 5000: ...
|
Dec. 29, 2016, 11:17 p.m. |
+ 1 |
for Comment
atheos: I'm gonna tattoo that on my forehead :P
|
Dec. 29, 2016, 11:17 p.m. |
+ 1 |
for Comment
oduvan: It will make sense if your are always coding somewhere near a mirror ;)
|
Dec. 29, 2016, 11:03 a.m. |
+ 1 |
for Comment
veky: I think this is the Perliest Python I've ever written. :-D
|
Dec. 29, 2016, 11:01 a.m. |
+ 1 |
for Comment
veky: Yes, I'm proud of `t` too. :-] `__import__` is just a tiny part in the [overall picture](https://doc...
|
Dec. 29, 2016, 10:54 a.m. |
+ 1 |
for Comment
oduvan: > Commenting obvious things isn’t a good practice. Double plus for this :)
|
Dec. 28, 2016, 11:15 p.m. |
+ 1 |
for Comment
veky: > I’m just not a fan of redefining built-in functions, It's a surprisingly common misconception. You...
|
Dec. 27, 2016, 6:29 p.m. |
+ 1 |
for Comment
veky: Much clearer: define min_max with its true signature (reverse:bool, *args, key=None) and say min = f...
|
Dec. 27, 2016, 3:47 p.m. |
+ 1 |
for Comment
oduvan: Recheck process is started :)
|
Dec. 21, 2016, 12:17 p.m. |
+ 1 |
for Comment
thibo.delattre: Thanks, it works now!
|
Dec. 20, 2016, 8:15 a.m. |
+ 1 |
for Comment
Sim0000: Answer of 2100 is Friday.
|
Dec. 12, 2016, 10:13 p.m. |
+ 1 |
for Comment
veky: > zašto pričamo na engleskom? :P Because not everyone here understands Slavic languages well enough....
|
Nov. 24, 2016, 5:26 p.m. |
+ 1 |
for Comment
DahliaSR: Can't see something that might be a bug. Why do you think there is a bug?
|
Oct. 18, 2016, 3:09 p.m. |
+ 1 |
for Comment
veky: You mean "one import missions"? :-D from some.obscure.module import the_right_function as checkio
|
Sept. 29, 2016, 7:19 p.m. |
+ 1 |
for Comment
veky: I have another idea for solutions filter: "my solutions". ( In my case they are usually at the top, ...
|
Sept. 18, 2016, 5:42 p.m. |
+ 1 |
for Comment
badwall: If you complete new to the Python or programming in general, you need to figure out the difference b...
|
Sept. 15, 2016, 7:39 a.m. |
+ 1 |
for Comment
veky: Batteries, batteries, batteries! :-)
|
Sept. 9, 2016, 1:57 p.m. |
+ 1 |
for Comment
han97: Better use join method of strings to concatenate strings
|
Aug. 29, 2016, 11:02 a.m. |
+ 1 |
for Comment
frantisek.jahoda: I think that cannot be used. Because comparison of lists seems to work like default order for tuples...
|
Aug. 21, 2016, 9:20 p.m. |
+ 1 |
for Comment
han97: Use getattr built-in function. For example: getattr(hashlib, "md5") -> hashlib.md5
|
July 13, 2016, 1:04 p.m. |
+ 1 |
for Comment
bryukh: Sounds good. Bryukh approves it.
|
July 13, 2016, 11:19 a.m. |
+ 1 |
for Comment
veky: Great. Now can we _finally_ use the whole stdlib, please? :-P
|
June 17, 2016, 9 p.m. |
+ 1 |
for Comment
veky: I'm sorry about that. What's your question exactly? "Why not use a def"? 1. Can you answer the quest...
|
June 17, 2016, 8:56 p.m. |
+ 1 |
for Comment
veky: Also from PEP8: "This document gives coding conventions for the Python code comprising the standard ...
|
June 17, 2016, 2:54 p.m. |
+ 1 |
for Comment
hrvoje: E Mirko, Mirko, da ti žena zna kakvim lijepim Ruskinjama ostavljaš komentare. :-)))))
|
May 30, 2016, 3:10 p.m. |
+ 1 |
for Comment
veky: In fact, only the first and last [day](https://checkio.org/mission/the-most-frequent-weekdays/public...
|