Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #7566

I want this to work. [[]] * n

From SherjilOzair <sherjilozair@gmail.com>
Newsgroups comp.lang.python
Subject I want this to work. [[]] * n
Date 2011-06-13 15:37 -0700
Organization http://groups.google.com
Message-ID <45f5e602-b196-43b4-97cd-5fa8d4b7058c@h12g2000pro.googlegroups.com> (permalink)

Show all headers | View raw


I want a list which contains n lists, which are all different. I had
read a page which was about the mutability of lists, and how the *
operator on lists just does a shallow copy. But I can't find it now.
Does anyone know of that page ?

Either way, How to get a list of list, with all original lists ?

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

I want this to work. [[]] * n SherjilOzair <sherjilozair@gmail.com> - 2011-06-13 15:37 -0700
  Re: I want this to work. [[]] * n Chris Angelico <rosuav@gmail.com> - 2011-06-14 08:51 +1000
    Re: I want this to work. [[]] * n SherjilOzair <sherjilozair@gmail.com> - 2011-06-14 00:38 -0700

csiph-web