On 5/24/12 22:22 , Scott Siegler wrote:
I am an experienced programmer but a beginner to python. As such, I can figure out a way
to code most algorithms using more C style syntax.
I am doing something now that I am sure is a more python way but i can't quite
get it right. I was hoping
On 24 May 2012 21:22, Scott Siegler scott.sieg...@gmail.com wrote:
Hello,
I am an experienced programmer but a beginner to python. As such, I can
figure out a way to code most algorithms using more C style syntax.
I am doing something now that I am sure is a more python way but i can't
On Thu, 24 May 2012 13:22:43 -0700, Scott Siegler wrote:
is there a way to do something like:
[(x,y-1), (x,y+1) for zzz in coord_list]
or something along those lines?
[(xx,yy) for x, y in coord_list for xx, yy in [(x,y-1),(x,y+1)]]
or:
[(x,yy) for x, y in coord_list for yy in
On Thu, May 24, 2012 at 5:12 PM, Emile van Sebille em...@fenx.com wrote:
On 5/24/2012 2:30 PM Paul Rubin said...
Paul Rubinno.email@nospam.invalid writes:
new_list = chain( ((x,y-1), (x,y+1)) for x,y in coord_list )
Sorry:
new_list = list(chain( ((x,y-1), (x,y+1)) for x,y in
Scott Siegler scott.sieg...@gmail.com wrote:
Hello,
I am an experienced programmer but a beginner to python. As such, I
can figure out a way to code most algorithms using more C style
syntax.
I am doing something now that I am sure is a more python way but i
can't quite get it right.
Scott Siegler scott.sieg...@gmail.com writes:
is there a way to do something like:
[(x,y-1), (x,y+1) for zzz in coord_list]
or something along those lines?
You should read the docs of the itertools module on general principles,
since they are very enlightening in many ways. Your
On 05/24/2012 04:22 PM, Scott Siegler wrote:
Hello,
I am an experienced programmer but a beginner to python. As such, I can
figure out a way to code most algorithms using more C style syntax.
I am doing something now that I am sure is a more python way but i can't
quite get it right. I
Paul Rubin no.email@nospam.invalid writes:
new_list = chain( ((x,y-1), (x,y+1)) for x,y in coord_list )
Sorry:
new_list = list(chain( ((x,y-1), (x,y+1)) for x,y in coord_list))
--
http://mail.python.org/mailman/listinfo/python-list
On 5/24/2012 2:30 PM Paul Rubin said...
Paul Rubinno.email@nospam.invalid writes:
new_list = chain( ((x,y-1), (x,y+1)) for x,y in coord_list )
Sorry:
new_list = list(chain( ((x,y-1), (x,y+1)) for x,y in coord_list))
from itertools import chain
coord_list =
On 5/24/2012 4:53 PM, Duncan Booth wrote:
Scott Sieglerscott.sieg...@gmail.com wrote:
Hello,
I am an experienced programmer but a beginner to python. As such, I
can figure out a way to code most algorithms using more C style
syntax.
Hi, welcome to Python. I came here from C also.
I am
10 matches
Mail list logo