Tuesday, 15 March 2011

Understanding Python Lists

This post is now in my new blog:
http://martin-thoma.com/understanding-python-lists/

1 comment:

  1. Nice post!

    Another issue I ran into concerns the scoping of Python:

    i=0
    [i for i in [1,2,3]]
    print (i) # yields 3

    That means, python doesn't create a new variable for the list comprehension but uses the outer i.

    ReplyDelete