April 22, 2015, 8:46 a.m. |
+ 1 |
for Comment
Amachua: And it's the kind of mission where people can express themselves a bit more than in a simple path fi...
|
April 22, 2015, 8:09 a.m. |
+ 1 |
for Comment
Amachua: It's one of the reason why I like this number. But the main reason is that in the occidental culture...
|
April 20, 2015, 7:50 p.m. |
+ 1 |
for Comment
veky: > I like this yield from range. Then please upgrade CiO to Py3.5 :-]
|
April 20, 2015, 5:27 a.m. |
+ 1 |
for Comment
veky: Hm, I'm not sure your distinction of Math vs Creative is meaningful. I think math-approach _is_ crea...
|
April 17, 2015, 3:02 p.m. |
+ 1 |
for Comment
reviewboy: BTW, thank you so much for all the feedback. I took a week-long Python course two weeks ago, so I'm ...
|
April 17, 2015, 3:02 p.m. |
+ 1 |
for Comment
reviewboy: > Probably you meant something else. :-) Yes and no. Our first TRS-80 was upgraded with an expansion...
|
April 16, 2015, 2:20 p.m. |
+ 1 |
for Comment
KRThunder: datetime.weekday() Return the day of the week as an integer, where Monday is 0 and Sunday is 6. The ...
|
April 13, 2015, 12:36 p.m. |
+ 1 |
for Comment
suic: Hi, can't do what?
|
April 10, 2015, 8:32 a.m. |
+ 1 |
for Comment
veky: Weird is better than complex too. :-] It is well known how to implement if...else with lambda, and l...
|
March 31, 2015, 2:01 p.m. |
+ 1 |
for Comment
Peter.White: What the...? ;) Just great. Wish I had thought of that.
|
March 30, 2015, 5:14 a.m. |
+ 1 |
for Comment
suic: Hi, forget about myList and myList1 outside the checkio function. These are _global variables_. (loo...
|
March 30, 2015, 5:13 a.m. |
+ 1 |
for Comment
suic: Hi, it should be checkio() and not ExecFunction and you have to return your result and not print: de...
|
March 25, 2015, 8:01 a.m. |
+ 1 |
for Comment
guido: Cool solution! Very clever use of str.split() and a strict interpretation of the input format descri...
|
March 24, 2015, 11:54 a.m. |
+ 1 |
for Comment
mandalorx: There is no lambda, WHO ARE YOU AND WHAT HAVE YOU DONE WITH VEKY!!!!! :P
|
March 17, 2015, 7:38 a.m. |
+ 1 |
for Comment
suic: Hi @bryukh. The "print instead of return" is one of the most common mistakes made by newbies. I real...
|
March 11, 2015, 12:02 p.m. |
+ 1 |
for Comment
veky: ROTFL. You have some really funny ways of being right. :-D
|
March 2, 2015, 2:45 p.m. |
+ 1 |
for Comment
cierand: this made me chuckle, nice work =]
|
Feb. 21, 2015, 1:09 p.m. |
+ 1 |
for Comment
giolefpaceid: Nice one! Similar solution here!
|
Feb. 20, 2015, 1:20 p.m. |
+ 1 |
for Comment
veky: Fizz Buzz: actually very readable. But has a few antipatterns... "not" would surely be better than s...
|
Feb. 17, 2015, 7:26 a.m. |
+ 1 |
for Comment
andraz.gruden.90: i have made the same but check this out. I have converted, joined string with "*" replaced "0", "1" ...
|
Feb. 16, 2015, 7:23 a.m. |
+ 1 |
for Comment
veky: > why the last * in your R? :-P Because I wasn't trying to golf? :-] It's funny how people interpret...
|
Feb. 14, 2015, 8:27 a.m. |
+ 1 |
for Comment
nickie: I think this solution could pass as "clear". The loop in line 38 counts each row that it finds and a...
|
Feb. 14, 2015, 8:27 a.m. |
+ 1 |
for Comment
guido: Nice one! Not a word too many. Still, I couldn't help thinking of what may be an improvement: check ...
|
Feb. 14, 2015, 8:27 a.m. |
+ 1 |
for Comment
guido: Nice use of defaultdict(set), and I like the optimization of subtracting the best trace from all_nod...
|
Feb. 13, 2015, 2:46 p.m. |
+ 1 |
for Comment
DiZ: Great solutions as always. Data representation was a difficult point in this task. By the way, you c...
|
Feb. 13, 2015, 2:46 p.m. |
+ 1 |
for Comment
veky: Just a note about my `R`: of all solutions you study, only vinc has something that remotely looks li...
|
Feb. 10, 2015, 8:53 a.m. |
+ 1 |
for Comment
ParadisiacMercy: I don't actually have preference but thought A* would be simple and easy for this task with its snip...
|
Feb. 9, 2015, 9:51 a.m. |
+ 1 |
for Comment
ale1ster: The following test case breaks the second assertion: assert break_rings(({5, 6}, {4, 5}, {3, 4}, {3,...
|
Feb. 8, 2015, 7:18 p.m. |
+ 1 |
for Comment
Happiness: Just another way to do the same: new_set = words_set.difference({wd})
|
Feb. 6, 2015, 4:55 p.m. |
+ 1 |
for Comment
veky: No problem with me (however, I'm not the right person to ask that). But "beginner" doesn't necessari...
|
Feb. 6, 2015, 4:52 p.m. |
+ 1 |
for Comment
veky: I'm surprised by some decisions. Whoever wrote this, seems to prefer .issubset over an operator, `<=...
|
Feb. 6, 2015, 6:24 a.m. |
+ 1 |
for Comment
veky: _that_ would even I consider creative. :-D Yes, it is, in a way, my main gripe with categories. When...
|
Feb. 6, 2015, 5:10 a.m. |
+ 1 |
for Comment
veky: Nice UF. But of course you don't need a class. Line 44: You don't need `list()`. In fact you don't n...
|
Feb. 5, 2015, 5:43 p.m. |
+ 1 |
for Comment
veky: Again, `set` has many nice operations. For example, `<=` (subset). ;-) Also, don't write 'abcdefghij...
|
Feb. 4, 2015, 11:27 a.m. |
+ 1 |
for Comment
Simmol: I agree that Game development on python is a problem, for beginners especially. Actually PyGame do a...
|
Jan. 28, 2015, 6:58 p.m. |
+ 1 |
for Comment
Columpio: > “round towards zero” will be correct. Thanks. agree with you sorry my excessive pedantry =)
|
Jan. 28, 2015, 7:47 a.m. |
+ 1 |
for Comment
suic: Hi, look at the result of bin(5).
|
Jan. 28, 2015, 7:47 a.m. |
+ 1 |
for Comment
suic: Hi, that's python's syntax binary representation of integers (look at _Syntax for supported radices_...
|
Jan. 27, 2015, 7:10 p.m. |
+ 1 |
for Comment
suic: Hi, it should work like this: 1. Click for example on Elementary, then you should see the list of mi...
|
Jan. 27, 2015, 7:10 p.m. |
+ 1 |
for Comment
OMFGNuts: Thanx. I'm working on adding gigantic FAQ on forum soon, so this kind of questions will resolve with...
|
Jan. 27, 2015, 3:26 p.m. |
+ 1 |
for Comment
OMFGNuts: string = "" for command in commands: splited = command.split() if len(splited) > 1: string += splite...
|
Jan. 27, 2015, 7:18 a.m. |
+ 1 |
for Comment
coole_r: I solved it!!! Very interesting! But i have 1 question. Why "~" don't work? I replace "~" to "(1- *)...
|
Jan. 27, 2015, 7:17 a.m. |
+ 1 |
for Comment
Sim0000: **index** is a function returns the position of first occurrence. In your case, 84 appears twice, 9t...
|
Jan. 27, 2015, 6:07 a.m. |
+ 1 |
for Comment
suic: Hi, there are several things. Let me mention three: 1. Lines 9-11 do nothing. You check e. g. if i i...
|
Jan. 27, 2015, 6:03 a.m. |
+ 1 |
for Comment
Sim0000: I send pull request
|
Jan. 27, 2015, 6:03 a.m. |
+ 1 |
for Comment
Sim0000: I found errors in test.py - question list -> string - category name in question
|
Jan. 26, 2015, 6:17 a.m. |
+ 1 |
for Comment
suic: > we have to print output From where did you get it? It's not true and it does not make sense, as: 1...
|
Jan. 26, 2015, 6:17 a.m. |
+ 1 |
for Comment
suic: Hi, you have to __return__ your result and __not print__.
|
Jan. 26, 2015, 6:10 a.m. |
+ 1 |
for Comment
suic: Hi, read the description: > your code __[has to] be shorter than 140 characters__ (with whitespaces)...
|
Jan. 26, 2015, 6:10 a.m. |
+ 1 |
for Comment
spoty: You have mistakes on lines: 6 and 9 6. You do not need to assign anything to result. 9. You should r...
|
Jan. 26, 2015, 6:10 a.m. |
+ 1 |
for Comment
suic: Hi list.append() __modifies__ the list and __returns None__. # So: result.append(x) # instead of: re...
|
Jan. 25, 2015, 2:35 p.m. |
+ 1 |
for Comment
veky: I have no idea whether you're wrong. And that's the problem. This whole category business is complet...
|
Jan. 25, 2015, 5:32 a.m. |
+ 1 |
for Comment
Sim0000: In line 11, width_NS -> width_WE.
|
Jan. 25, 2015, 5:32 a.m. |
+ 1 |
for Comment
Sim0000: The function has three parameters. First and second parameters always have the same length. However,...
|
Jan. 24, 2015, 1:40 p.m. |
+ 1 |
for Comment
suic: Hi, you could clean it up a bit. E. g.: 1. Remove the print statements 2. int(a, 10) == int(a) so yo...
|
Jan. 24, 2015, 1:39 p.m. |
+ 1 |
for Comment
suic: Hi, because _list.append_ updates the list and returns _None_ __not the updated list__. # You should...
|
Jan. 24, 2015, 1:39 p.m. |
+ 1 |
for Comment
suic: Hi, because you should __return__ the output and __not print__ it.
|
Jan. 24, 2015, 10:18 a.m. |
+ 1 |
for Comment
veky: https://www.google.hr/webhp?#newwindow=1&q=%22from+fractions+import+Fraction+as+F%22+site:python.org...
|
Jan. 23, 2015, 6:43 a.m. |
+ 1 |
for Comment
Sim0000: This is elementary mission idea. Given a sentence, check whether the sentence is pangram. Pangram is...
|
Jan. 23, 2015, 5:40 a.m. |
+ 1 |
for Comment
suic: Hi, two things: 1. Your function has to __return__ the result and __not print__ it. That's main reas...
|
Jan. 22, 2015, 11:03 a.m. |
+ 1 |
for Comment
suic: Thanks for sharing this. > Unfortunately, these pages are about FSharp Let me ask: Why unfortunately...
|
Jan. 22, 2015, 11:03 a.m. |
+ 1 |
for Comment
suic: Sorry, there was a little bit of sarcasm in my question :) When you're familiar with .NET F# is an o...
|
Jan. 22, 2015, 11:03 a.m. |
+ 1 |
for Comment
hanpari: Dont take me wrong. I like fsharp, it seems to me like great language. "Unfortunatelly" just because...
|
Jan. 21, 2015, 11:30 a.m. |
+ 1 |
for Comment
chhyx2008: But, sets do not support indexing.
|
Jan. 21, 2015, 11:30 a.m. |
+ 1 |
for Comment
Cjkjvfnby: For one side it is clear and readable but for other is so uneducative for it algorithmic complexity....
|
Jan. 21, 2015, 11:30 a.m. |
+ 1 |
for Comment
Lijantropique: Nothing special, just an alternative way of doing the same thing.
|
Jan. 21, 2015, 11:30 a.m. |
+ 1 |
for Comment
maurice.makaay: It is not the same thing (which is logical, otherwise the Python team would not have created two fun...
|
Jan. 21, 2015, 11:30 a.m. |
+ 1 |
for Comment
Lijantropique: I didn't said permutations were the same as product, I said product can be used when you are dealing...
|
Jan. 21, 2015, 11:30 a.m. |
+ 1 |
for Comment
maurice.makaay: Oh yes, if you were only talking about the two for loops, then you're correct. My apologies. I was l...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
Lijantropique: You're absolutely right. With the “if”, the product is not the best option but the permutations.
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
odwl: By sorting words by len, you can have just a triangle matrix path By sorting lexical order, you can ...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
kamikaze: my is cleaner :))
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
kamikaze: "Clear" != "Speedy" categories :)
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
sandarovich: Thank you for publication. endswith - is proper solution in this case. But as for me "if statement" ...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
Cjkjvfnby: **If** will be much shorter if you reverse all worlds and remove duplicates before loops:)
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
jollyca: Isn't it faster if you make the double-loop over the set sorted in the descended order of the length...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
RyanAlexander: I learn a better/more efficient way from almost every one of your solutions. Thanks for publishing t...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
zver1zver2: very good code
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
masero: Hi, as endswith() accepts tuples, isn't better to write for w in words: if w.endswith(tuple(x for x ...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
Blukano: This is a nice solution - I didn't know about endswith, so my solution was a bit more complex. Also,...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
cle99y: a set can include identical data, try it :)
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
pynur: why you use "w1.endswith(w2) or w2.endswith(w1)"? You think it's be faster then we use only 'w1.ends...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
viktor.pecheniuk: cool:)
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
netgamer: First time did i see this function (endswith)
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
pbeesley: I got hung up on the indentation of the "return False". Why doesn't the indented "return false" over...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
andreylarionov: Cool! But, I think that OR condition is not needed: if w1 != w2 and w1.endswith(w2): return True Cor...
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
hendrikrichard.scholten_e44275: Nice solution short and easy
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
marshall.zheng: good and clear
|
Jan. 21, 2015, 11:29 a.m. |
+ 1 |
for Comment
cle99y: better than slicing (DOH !)
|
Jan. 21, 2015, 8:18 a.m. |
+ 1 |
for Comment
suic: Paste you code as code :)
|
Jan. 21, 2015, 8:18 a.m. |
+ 1 |
for Comment
suic: Hi, there are a few issues 1. return True or False always returns True 2. Line 7 is overindented and...
|
Jan. 21, 2015, 8:18 a.m. |
+ 1 |
for Comment
suic: Hi, the problem is the you don't return True (or False) i. e. __bool__ but "True" and "False" i. e. ...
|
Jan. 20, 2015, 5:20 a.m. |
+ 1 |
for Comment
bukebuer: Well, based on my experience, the key is to find out which ring to break when some rings has same hi...
|
Jan. 20, 2015, 5:19 a.m. |
+ 1 |
for Comment
DiZ: You have to check if __N__ is inside the array. Don't put a condition on array length.
|
Jan. 20, 2015, 5:19 a.m. |
+ 1 |
for Comment
Sim0000: Line 9 is no meaning.
|
Jan. 20, 2015, 5:18 a.m. |
+ 1 |
for Comment
DiZ: was a way to say , ie. word[i], because you need to work on indexes, not on list elements. * Why _if...
|
Jan. 20, 2015, 5:18 a.m. |
+ 1 |
for Comment
DiZ: You checked if len(array) >= 3 - good point. But you need to do this - _and_ to exit your function -...
|
Jan. 20, 2015, 5:03 a.m. |
+ 1 |
for Comment
Sim0000: In line 7, x[len(x) / 2 -> x[len(x) // 2.
|
Jan. 16, 2015, 10:07 a.m. |
+ 1 |
for Comment
Sim0000: Your code always return False, because line 10-11 are in for loop. You need to move _return False_ t...
|
Jan. 16, 2015, 10:07 a.m. |
+ 1 |
for Comment
Sim0000: See [Format String Syntax](https://docs.python.org/3.3/library/string.html#format-string-syntax). de...
|