Python vs Ruby
bruno modulix
onurb at xiludom.gro
Mon Oct 24 04:26:04 EDT 2005
Alex Martelli wrote:
(snip)
> Here's a tiny script showing some similarities and differences:
>
> def f()
> i = 0
> while i < 1000000
> j = 923567 + i
> i += 1
> end
> end
>
> f()
>
> comment out the 'end' statements, and at colons
s/at/add/
> at the end of the def
> and while statements, and this is also valid Python.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list
mailing list