Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46456
| References | <921173f3-21e7-46b4-a7b1-86660a3ebc72@googlegroups.com> <fd037baa-b5b0-435e-b035-4e25b0d3acbd@googlegroups.com> |
|---|---|
| From | Joshua Landau <joshua.landau.ws@gmail.com> |
| Date | 2013-05-30 12:11 +0100 |
| Subject | Re: Can anyone please help me in understanding the following python code |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2404.1369912673.3114.python-list@python.org> (permalink) |
On 30 May 2013 11:19, <bhk755@gmail.com> wrote: > Also, Can you please let me know how did you found out that I am using Python 2 Interpreter. Do you have access to a Python3 interpreter? If so, try running it and your output will look like: Splitting [54, 26, 93, 17, 77, 31, 44, 55, 20] Splitting [54, 26, 93, 17] Splitting [54, 26] Splitting [54] Merging [54] Splitting [26] Merging [26] ... BLAH BLAH BLAH Which is obviously much nicer. This is how Chris knew the code was written for Python3. Therefore I would suggest you use Python3 - not all code runs on both! The "proper" way to write the prints for Python2 is without the brackets: print "Merging ",alist But the methods Chris and I have used work the same on both so are probably better in this case. They're more complicated, though.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Can anyone please help me in understanding the following python code bhk755@gmail.com - 2013-05-30 02:48 -0700
Re: Can anyone please help me in understanding the following python code Chris Angelico <rosuav@gmail.com> - 2013-05-30 20:01 +1000
Re: Can anyone please help me in understanding the following python code Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2013-05-30 10:17 +0000
Re: Can anyone please help me in understanding the following python code bhk755@gmail.com - 2013-05-30 03:19 -0700
Re: Can anyone please help me in understanding the following python code Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2013-05-30 10:43 +0000
Re: Can anyone please help me in understanding the following python code Chris Angelico <rosuav@gmail.com> - 2013-05-30 20:47 +1000
Re: Can anyone please help me in understanding the following python code Joshua Landau <joshua.landau.ws@gmail.com> - 2013-05-30 12:11 +0100
Re: Can anyone please help me in understanding the following python code Joshua Landau <joshua.landau.ws@gmail.com> - 2013-05-30 12:03 +0100
Re: Can anyone please help me in understanding the following python code bhk755@gmail.com - 2013-05-30 05:39 -0700
Re: Can anyone please help me in understanding the following python code bhk755@gmail.com - 2013-05-30 05:42 -0700
Re: Can anyone please help me in understanding the following python code Dave Angel <davea@davea.name> - 2013-05-30 09:29 -0400
Re: Can anyone please help me in understanding the following python code bhk755@gmail.com - 2013-05-30 05:42 -0700
Re: Can anyone please help me in understanding the following python code Chris Angelico <rosuav@gmail.com> - 2013-05-30 22:55 +1000
Re: Can anyone please help me in understanding the following python code bhk755@gmail.com - 2013-05-30 06:01 -0700
Re: Can anyone please help me in understanding the following python code bhk755@gmail.com - 2013-05-30 21:53 -0700
Re: Can anyone please help me in understanding the following python code bhk755@gmail.com - 2013-05-30 21:54 -0700
Re: Can anyone please help me in understanding the following python code Cameron Simpson <cs@zip.com.au> - 2013-05-31 15:43 +1000
Re: Can anyone please help me in understanding the following python code Chris Angelico <rosuav@gmail.com> - 2013-05-31 17:13 +1000
Re: Can anyone please help me in understanding the following python code rusi <rustompmody@gmail.com> - 2013-06-01 10:43 -0700
csiph-web