Guyon Mor?e wrote:
You're gonna love this :)
http://aspn.activestate.com/ASPN/Cookbook/Python
"Aur?lien G?ron" <ageron at HOHOHOHOvideotron.ca> wrote in message
news:be1hs0$111s$1 at biggoron.nerim.net...
You're gonna love this :)
http://aspn.activestate.com/ASPN/Cookbook/Python
"Aur?lien G?ron" <ageron at HOHOHOHOvideotron.ca> wrote in message
news:be1hs0$111s$1 at biggoron.nerim.net...
Hi,
Does anyone know where I can find a lot of Python code snippets?
Does anyone know where I can find a lot of Python code snippets?
newsgroup/mailing-list one gets to see really lots of nice code.
One that I would nominate as the best test for measuring a hard-core
python programmer would be to explain the following code without the
context :)
Karl Scalet wrote:
there are very likely easier ways, but at least >
s = 'C6 H12 O6'
print [' '.join(xx) for xx in apply(
zip,[(x[0],x[1:]) for x in s.split()])] >
gives some results, >
Karl
Once I understood the above, I beleive I will write python in my Resume...s = 'C6 H12 O6'
print [' '.join(xx) for xx in apply(
zip,[(x[0],x[1:]) for x in s.split()])] >
gives some results, >
Karl
What was this about "One simple obvious way doing it"? ;)