Re: [Tutor] Newbie

2007-08-28 Thread Lutz Horn
Hi, On Tue, 28 Aug 2007 22:25:11 -0400, "Toby Holland" <[EMAIL PROTECTED]> said: > I was wondering if any of you had any advice as to where I should > start in regards to learning using and programing with Python. Take a look at: * "Byte of Python"

Re: [Tutor] Detecting sequences in lists

2007-08-27 Thread Lutz Horn
Hi, DIY is easy. On Mon, 27 Aug 2007 09:20:53 -0400, "Tino Dai" <[EMAIL PROTECTED]> said: > What I want to do is detect the 1,2,4 sequence and perhaps how many. >>> tset = [ 1,2,4,0,0,1,2,4,4] >>> s = [1, 2, 4] >>> c = 0 >>> for i in range(len(tset) - len(s)): ... if tset[i:i+len(s)] == s: .

Re: [Tutor] Very Newbie

2005-03-22 Thread Lutz Horn
[1] http://docs.python.org/lib/module-SimpleHTTPServer.html -- pub 1024D/6EBDA359 1999-09-20 Lutz Horn <[EMAIL PROTECTED]> 438D 31FC 9300 CED0 1CDE A19D CD0F 9CA2 6EBD A359 http://purl.oclc.org/NET/lutz.horn DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen! AKTION "Ke

Re: [Tutor] print command

2005-03-20 Thread Lutz Horn
Hi, > To clarify: > > print 1 > print 2 > print 3 > > I want output to be > > 123 >>> l = [1, 2 3] >>> i = int("".join(map(str, l))) >>> print i, type(i) 123 If you don't care about the blanks, you can use >>> p