mblume於 2012年9月14日星期五UTC+8上午12時26分17秒寫道: > Am Thu, 13 Sep 2012 17:00:19 +0100 schrieb andrea crotti: > > > > > > I have to give a couple of Python presentations in the next weeks, and > > > I'm still thinking what is the best approach. > > > > > My idea for an introductory presentation of python was to prepare some > > code snippets (all valid python), show them in the editor, explain them, > > then run in a console. > > > > Beginners could then use these code snippets for their own experiments. > > > > HTH > > Martin
I'll contribute one point in Python. def powerlist(x, n): # n is a natural number result=[] y=1 for i in xrange(n): result.append(y) y*=x return result # any object in the local function can be returned -- http://mail.python.org/mailman/listinfo/python-list