May 5, 2015, 8:48 p.m. |
+ 1 |
for
"I Love Python" Overview
|
May 5, 2015, 8:35 p.m. |
+ 1 |
for Comment
abaskm: This was very clear. Thanks!
|
April 7, 2015, 11:29 p.m. |
+ 1 |
for Comment
veky: Look: numerals = dict( M = 1000, CM = 900, D = 500, CD = 400, ... ) for numeral, integer in sorted(n...
|
April 7, 2015, 11:18 p.m. |
+ 1 |
for Comment
veky: Few nitpicks: * romanNumeralMap really should be a dict. Yes, I know it won't be sorted, but you can...
|
April 7, 2015, 11:18 p.m. |
+ 1 |
for Comment
veky: If you disagree with the substance, say exactly what you disagree with. If you disagree with the sty...
|
April 7, 2015, 10:44 p.m. |
+ 3 |
for
First-nooodl
|
April 7, 2015, 8:26 p.m. |
+ 3 |
for
Simulated-PositronicLlama
|
April 7, 2015, 8:22 p.m. |
+ 1 |
for
First-voroninman_c8846b1d0ba947a4823
|
April 7, 2015, 7:15 p.m. |
+ 3 |
for
yield each wave-sevaader
|
April 7, 2015, 12:59 p.m. |
+ 1 |
for Comment
veky: Ok, first: Too. Many. Comments. Really. This is not C, where you write the code primarily for the pr...
|
April 7, 2015, 12:03 p.m. |
+ 3 |
for
Friends set-hanpari
|
April 7, 2015, 11:59 a.m. |
+ 2 |
for
First-agdk26
|
April 7, 2015, 11:49 a.m. |
+ 1 |
for Comment
Eldin: Nice work using the set and generator!
|
April 7, 2015, 11:34 a.m. |
+ 1 |
for Comment
Cjkjvfnby: http://www.checkio.org/forum/post/1618/proper-way-to-check-if-sequence-is-empty/
|
April 7, 2015, 11:32 a.m. |
+ 1 |
for Comment
teplolog: Code looks like a story!
|
April 7, 2015, 11:31 a.m. |
+ 3 |
for
First-gyahun_dash
|
April 7, 2015, 11:29 a.m. |
+ 2 |
for
First-Sim0000
|
April 6, 2015, 4:46 p.m. |
+ 1 |
for Comment
kazuau: Uladzimir, thanks for your info. As a newbie to Python, I don't feel very comfortable when the exist...
|
April 6, 2015, 3:59 p.m. |
+ 1 |
for Comment
makernaren: Yeah Peter, I had to do that dirty coding as i was in a hurry. :)
|
April 3, 2015, 5:08 a.m. |
+ 1 |
for Comment
veky: Well, I get headaches from reading _your_ solutions, so we're even. :-P Let me tell you a secret: I ...
|
April 3, 2015, 5:06 a.m. |
+ 1 |
for Comment
veky: Don't be too sad, making mistakes is exactly the way people learn the most. Yes, counterintuitive, b...
|
April 3, 2015, 5:05 a.m. |
+ 1 |
for Comment
panaro32: That's right! You can make the code work for all (square) boards without many changes. Something lik...
|
April 2, 2015, 8:39 p.m. |
+ 3 |
for
o, safe pawns...-veky
|
April 2, 2015, 8:32 p.m. |
+ 1 |
for Comment
gyahun_dash: > string formatting will make it more readable '%c%c'. I've heard that we would rather not use print...
|
April 2, 2015, 8:32 p.m. |
+ 1 |
for Comment
Cjkjvfnby: string formatting will make it more readable '%c%c'. you can use set methods to find intersection.
|
April 2, 2015, 8:27 p.m. |
+ 2 |
for
ord-gyahun_dash
|
April 2, 2015, 8:24 p.m. |
+ 1 |
for Comment
mlb00: This is a nice solution but PEP 8 should be encouraged, especially since this site is to promote cod...
|
April 2, 2015, 8:15 p.m. |
+ 1 |
for Comment
hanpari: But a little bit unreadable, don't you think? :) (At least for Clear category.)
|
April 2, 2015, 7:41 p.m. |
+ 1 |
for Comment
veky: If enumerate was implicit, first it would violate the Zen, and second (more important:), I wouldn't ...
|
April 2, 2015, 7:15 p.m. |
+ 1 |
for
First-volatilecat
|
April 2, 2015, 6:36 p.m. |
+ 1 |
for Comment
veky: My solutions are often deceivingly simple-looking. Don't be discouraged, learn little by little and ...
|
April 2, 2015, 5:23 p.m. |
+ 1 |
for Task
The Flat Dictionary
|
April 2, 2015, 9:31 a.m. |
+ 1 |
for Comment
OMFGNuts: Hi @Peter.White First of all, thank you for being such an active community member, we really appreci...
|
April 1, 2015, 8:44 p.m. |
+ 1 |
for Comment
lukas.linhart: I have to agree... it now took me a while to grasp it too, just a month after solving it. But I swea...
|
April 1, 2015, 7:22 p.m. |
+ 1 |
for
First-lukas.linhart
|
April 1, 2015, 7:11 p.m. |
+ 1 |
for
First-e.roboda
|
April 1, 2015, 6:58 p.m. |
+ 1 |
for
First-panaro32
|
April 1, 2015, 5:59 p.m. |
+ 1 |
for Post
A Guide to Pythons magic methods
|
April 1, 2015, 8:45 a.m. |
+ 1 |
for Comment
brlm.franke: and if the matrix is 5x5?
|
March 31, 2015, 10:06 p.m. |
+ 1 |
for
Second-gyahun_dash
|
March 31, 2015, 11:57 a.m. |
+ 1 |
for Task
Xs and Os Referee
|
March 31, 2015, 10:31 a.m. |
+ 2 |
for
max-count-bryukh
|
March 30, 2015, 10:42 p.m. |
+ 1 |
for Comment
suic: If you want to follow somebody, you have to go to his/her profile first, there is a _Follow_ button ...
|
March 30, 2015, 10:24 p.m. |
+ 1 |
for Comment
suic: You can try to disassemble it, with [dis](https://docs.python.org/2.7/library/dis.html?highlight=dis...
|
March 30, 2015, 9:40 p.m. |
+ 1 |
for Comment
diegueus9: Hi Peter, I did a little benchmark with your idea, mine and suic's, you can see the code here: http:...
|
March 30, 2015, 9:40 p.m. |
+ 1 |
for Comment
diegueus9: According to the docs: https://docs.python.org/2/library/time.html#time.clock On Unix, return the cu...
|
March 30, 2015, 9:40 p.m. |
+ 1 |
for Comment
diegueus9: BTW, for curiosity purposes I tested your published solution http://www.checkio.org/mission/pangram/...
|
March 30, 2015, 8:08 p.m. |
+ 1 |
for Comment
suic: What about len(set(text.lower)) == 26?
|
March 30, 2015, 7:51 p.m. |
+ 2 |
for
First-gyahun_dash
|
March 30, 2015, 7:50 p.m. |
+ 1 |
for
First-evoynov
|
March 30, 2015, 6:02 p.m. |
+ 1 |
for
Product (row,col) , can be written in one line-sevaader
|
March 30, 2015, 1:24 p.m. |
+ 1 |
for Task
Moore Neighbourhood
|
March 30, 2015, 12:37 p.m. |
+ 1 |
for Comment
fantakeshi: Yes, this import of fabs is verbose. Maybe I didn't know built-in abs() when I wrote this code...
|
March 30, 2015, 12:27 p.m. |
+ 1 |
for
Clear-denisbalyko
|
March 29, 2015, 7:08 p.m. |
+ 2 |
for
First-gyahun_dash
|
March 29, 2015, 5:12 p.m. |
+ 1 |
for
Oneliner-zlomovsky
|
March 29, 2015, 5:11 p.m. |
+ 1 |
for
First-saklar13
|
March 29, 2015, 5:02 p.m. |
+ 2 |
for
First-AlexanderSafronov
|
March 29, 2015, 5 p.m. |
+ 1 |
for
First-IrinaNizova
|
March 29, 2015, 4:02 p.m. |
+ 2 |
for
Deja vu-nickie
|
March 29, 2015, 3:54 p.m. |
+ 1 |
for
First-ciel
|
March 29, 2015, 3:52 p.m. |
+ 1 |
for Comment
veky: Yes, it "works". And then you write something a bit bigger, and it executes too long, and you press ...
|
March 29, 2015, 3:30 p.m. |
+ 1 |
for
Hinted-veky
|
March 29, 2015, 2:10 p.m. |
+ 1 |
for Comment
veky: Yes. To defend my view: def makes a full-fledged Python function, that _does_ something -- possibly ...
|
March 29, 2015, 12:32 p.m. |
+ 1 |
for Comment
voroninman_c8846b1d0ba947a4823: You should cache text.lower() instead of copying strings in a loop.
|
March 28, 2015, 8:19 p.m. |
+ 1 |
for
datetime-aoleynik
|
March 28, 2015, 8:19 p.m. |
+ 1 |
for
First-troglodyte
|
March 28, 2015, 7:59 p.m. |
+ 1 |
for Comment
vik: The "*" takes a sequance (list, tuple, set) and returns it in a form of positional arguments. Extrem...
|
March 28, 2015, 7:58 p.m. |
+ 1 |
for
First-bukebuer
|
March 27, 2015, 11:10 p.m. |
+ 1 |
for Comment
bukebuer: It equals to: def count_inversion(sequence): count = 0 for i,n in enumerate(sequence): # for every n...
|
March 27, 2015, 8:11 p.m. |
+ 1 |
for
First-DarkhanShakhanov
|
March 27, 2015, 7:20 p.m. |
+ 1 |
for
Learn lambda-denisbalyko
|
March 27, 2015, 6:55 p.m. |
+ 1 |
for
First-Andrew314
|
March 27, 2015, 6:03 p.m. |
+ 2 |
for
Grimoire-bryukh
|
March 27, 2015, 4:47 p.m. |
+ 1 |
for
First-rozbudowywowywacz
|
March 27, 2015, 4:26 p.m. |
+ 2 |
for
First-pytonio
|
March 27, 2015, 2:37 p.m. |
+ 2 |
for
First-spoty
|
March 27, 2015, 2:29 p.m. |
+ 1 |
for
Second-ceu9jo
|
March 27, 2015, 2:24 p.m. |
+ 1 |
for Comment
suic: In fact my point wasn't about category :) It reminded me on code I often see at work, when people us...
|
March 27, 2015, 2:15 p.m. |
+ 1 |
for Comment
suic: Hi, consider the fact, that __str__ is immutable in Python. And look at _filter()_ function or _list...
|
March 27, 2015, 2:15 p.m. |
+ 1 |
for Comment
suic: message += c always creates a new string. as message is immutable.
|
March 27, 2015, 2:11 p.m. |
+ 1 |
for Comment
suic: Hi, you can write: count += chunk.isalpha() # instead of: count = count+1 if chunk.isalpha() else 0
|
March 27, 2015, 2:05 p.m. |
+ 1 |
for Comment
suic: Hi, instead of lines 2, 4-6 you can write this: return sum(word in ltext for word in words)
|
March 27, 2015, 11:36 a.m. |
+ 1 |
for
First-BertrandBordage
|
March 27, 2015, 12:34 a.m. |
+ 1 |
for Comment
nickie: I won't question your arguments, which are fair in general and, as we all know, can be used to rule ...
|
March 27, 2015, 12:31 a.m. |
+ 1 |
for
O(n) select-nickie
|
March 26, 2015, 9:28 p.m. |
+ 1 |
for Comment
gethappy: Why is it quickly?
|
March 26, 2015, 9:24 p.m. |
+ 1 |
for
for else-veky
|
March 26, 2015, 9:18 p.m. |
+ 1 |
for Comment
veky: > I got email that you arguing with yourself That's exactly the problem here. Aiadan's responses con...
|
March 26, 2015, 9:16 p.m. |
+ 1 |
for Comment
veky: What's creative there? And more importantly, what's not clear? You have a finite state automaton tha...
|
March 26, 2015, 9:16 p.m. |
+ 1 |
for Comment
veky: Just by giving minuses you won't accomplish much. Speak your mind.
|
March 26, 2015, 9:07 p.m. |
+ 1 |
for Comment
veky: Basically yes. 1. bools _are_ ints. isinstance(False, int) returns True. 2. Yes, return is kinda lik...
|
March 26, 2015, 9:07 p.m. |
+ 1 |
for Comment
dfridman: I'm just learning and I usually come to the solutions to see how more experienced people do it. I of...
|
March 26, 2015, 8:59 p.m. |
+ 1 |
for Comment
veky: Thank you very much (and for +es on the other comments;). Just for the record, my intention is not r...
|
March 26, 2015, 8:58 p.m. |
+ 1 |
for Comment
veky: You're making yourself jump through hoops without any reason. I hate when people deliberately tie th...
|
March 26, 2015, 8:55 p.m. |
+ 1 |
for Comment
veky: Liskov says it does. :-P >>> issubclass(bool, int) True
|
March 26, 2015, 7:49 p.m. |
+ 1 |
for Comment
veky: Original intent is one thing, language evolution is another. For another example, Guido was at first...
|
March 26, 2015, 6:35 p.m. |
+ 1 |
for Comment
BertrandBordage: Not really the same, your solution is doing a lot of useless `n += 0` ;)
|
March 26, 2015, 6:22 p.m. |
+ 1 |
for Comment
e.roboda: speedy? ... text.lower() proceed in every loop :(
|
March 26, 2015, 5:15 p.m. |
+ 1 |
for
First-shisashi
|