A bunch of my friends and I have been chatting about "99 bottles of
beer" - and how to make the shortest code to do it. I have:
for i in range(100,0,-1):
print "%s bottles of beer on the wall, %s bottles of beer\nTake on
down, pass it around.."%(i,i)
print "Go to the store, buy some more"
I'm
I got a bounce... but have been on this list for months...
S.
___
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor
Steve Nelson wrote:
> A bunch of my friends and I have been chatting about "99 bottles of
> beer" - and how to make the shortest code to do it. I have:
>
> for i in range(100,0,-1):
>print "%s bottles of beer on the wall, %s bottles of beer\nTake on
> down, pass it around.."%(i,i)
> print "Go
kevin parks wrote:
> I have been handed a huge number of documents which have hundreds of
> pages of times and durations, all calculated and notated by several
> different people over the course of many years. Sadly, no made any
> guidelines at all about how this work would proceed and all th
I am reading a long python code with many if...then; I wonder whether
there is any way to trace the changes of the variables in the code. I
can not find debugger tutorial in detail in PythonWin. Thanks for any
suggestions.
Linda
___
Tutor maillist - Tut
>I really new to python.I try on learning it by code examples.The
> following one from "Dive into python":
If you know another language then the official tutorial is the best
place to start, it explains all of the items on your question list.
Dive into Python is very good but it is really intende
Hi,
I have just started learning python...
Following is an example from dive into python:
def info(object,spacing=10,collapse=1): """Print methods and doc strings. Takes module,class,list,dictionary or string.""" methodList=[method for method in dir(object) if callable(getattr(object,met
> So the input doc would be grepped for times and i could just
> uncomment the line i need and get he format my boss wants at this
> particular moment.
You shouldn't need to uncomment it if you can specify an
argument that describes which format you want. Then have
a bunch of formatting func
> for i in range(100,0,-1):
> print > print "Go to the store, buy some more"
>
> I'm curious to know other ways to handle this - could it be done
> functionally? How could we obfuscate this (not that we'd want to in
> real life)? Or make it a (close to) one liner?
print "".join(['%s bottles of
Hi All,
I've just today starting thinking more about programming in a more
functional style, and came across the following article which I
thought was really good:
http://www.amk.ca/python/writing/functional
I know there's a section in Alan's tutorial on FP too, but can anyone
else recommend som
On Thu, 6 Jul 2006, Steve Nelson wrote:
> I've just today starting thinking more about programming in a more
> functional style, and came across the following article which I thought
> was really good:
>
> http://www.amk.ca/python/writing/functional
Hi Steve,
The references on the bottom are
Steve Nelson wrote:
> Hi All,
>
> I've just today starting thinking more about programming in a more
> functional style, and came across the following article which I
> thought was really good:
>
> http://www.amk.ca/python/writing/functional
>
> I know there's a section in Alan's tutorial on FP
On Thu, 6 Jul 2006, Alan Gauld wrote:
> Not very obfuscated though...
For *true* obfuscation, nothing matches perl:
cut here --
''=~('(?{'.('`'|'%').('['^'-')
.('`'|'!')
On Thu, 6 Jul 2006, Steve Nelson wrote:
> I know there's a section in Alan's tutorial on FP too, but can anyone
> else recommend some good references?
I happened upon this column a few days ago, whic I found a good read to
explain the basic idea, for non-FPers like me:
http://www.defmacro.org
On Friday 07 July 2006 00:39, Terry Carroll wrote:
> Neither of these is particularly directed to Python, though.
Also, much as I like python, it's not really suited to functional programming
approaches, given recursion isn't tail optimised, lambda is by comparison
crippled, some aspects of python
15 matches
Mail list logo