Christoph Rackwitz wrote:
> Why not? Because the regex isn't compiled?
> Don't tell me not to do something, tell me why i should'nt do it.
No it's not the regex, it's because you just spoiled the challenge for
everybody who hasn't solved level 10 yet...
--
http://mail.python.org/mailman/listinfo
Why not? Because the regex isn't compiled?
Don't tell me not to do something, tell me why i should'nt do it.
--
http://mail.python.org/mailman/listinfo/python-list
Christoph Rackwitz wrote:
> i guess, it is pythonchallenge.com level 10?
> if so, i used this thing:
>
> import re
> def enc(s):
> return ''.join('%s%s' % (len(a[0]),a[0][0]) for a in
> re.findall('((.)\\2*)', s))
>
Don't do that!
--
http://mail.python.org/mailman/listinfo/python-list
i guess, it is pythonchallenge.com level 10?
if so, i used this thing:
import re
def enc(s):
return ''.join('%s%s' % (len(a[0]),a[0][0]) for a in
re.findall('((.)\\2*)', s))
--
http://mail.python.org/mailman/listinfo/python-list
Ray wrote:
> Well... I'm always paranoid that I'm, you know, writing Java in Python
> :)
The biggest mistakes I see are wrapping everything in a class
unnecessarily, or using accessor methods instead of properties (ugh,
ugh, ugh!). CamelCasingYourVariableNames is annoyingToMe but that's
really
Michael Hoffman wrote:
> Ray wrote:
>
> > I just wrote a short script that generates look and say sequence. What
> > do you Python guys think of it? Too "Java-ish"?
>
> Yes, but that's beside the point. :)
Well... I'm always paranoid that I'm, you know, writing Java in Python
:)
Thanks for the
Damn, those are cool, man. Thanks! This Python thing keeps expanding
and expanding my brain...
Ray
[EMAIL PROTECTED] wrote:
--
http://mail.python.org/mailman/listinfo/python-list
Two versions of mine, one of the fastest (not using Psyco) and one of
the shortest:
. from itertools import groupby
.
. def audioactiveFast(n):
. strl = {("1","1","1"): "31", ("1","1"): "21", ("1",): "11",
. ("2","2","2"): "32", ("2","2"): "22", ("2",): "12",
. ("3","3"
Ray wrote:
> I just wrote a short script that generates look and say sequence. What
> do you Python guys think of it? Too "Java-ish"?
Yes, but that's beside the point. :)
I think your basic design was sound enough for this application
(presumably this isn't something that needs to run at high s
Hello,
I just wrote a short script that generates look and say sequence. What
do you Python guys think of it? Too "Java-ish"? I can't shake off the
feeling that somebody may have done this with 2-3 lines of Python
magic. Heh.
# generator for sequence
def lookAndSaySequence(firstTerm, n):
term
10 matches
Mail list logo