

This is done by list comprehension(which makes looping elements in a list via one line code possible). Stack Exchange network consists of 182 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Arrays usually require a continuous piece of memory. Time traveller here List_of_list =,y) for y in range(10) for x in range(10)]

(I didn't use it in the first example because you were overwriting that name in your code - which is a good example of why you don't want to do that!) The second, list(), is using the actual list type constructor to create a new list which has contents equal to the first list. The first,, is creating a slice (normally often used for getting just part of a list), which happens to contain the entire list, and thus is effectively a copy of the list. Note that I demonstrated two different ways to make a copy of a list above: and list(). Listoflists.append((list(a_list), a_list)) Ask Question sharepoint-online2013sharepoint-enterprise2010sharepoint-serversharepoint-designerlistjavascriptworkflowdevelopment more. Here's a version that doesn't use list as a variable name, and makes a copy: listoflists =

However, list is already the name of a Python built-in - it'd be better not to use that name for your variable. Lists are a mutable type - in order to create a copy (rather than just passing the same list around), you need to do so explicitly: listoflists.append((list, list))
