About 17,000,000 results
Open links in new tab
  1. join list of lists in python - Stack Overflow

    Apr 4, 2009 · Closed 9 years ago. Is the a short syntax for joining a list of lists into a single list ( or iterator) in python? For example I have a list as follows and I want to iterate over a,b and c.

  2. python - How do I make a flat list out of a list of lists? - Stack …

    If your list of lists comes from a nested list comprehension, the problem can be solved more simply/directly by fixing the comprehension; please see How can I get a flat result from a list …

  3. How do I get the number of elements in a list (length of a list) in …

    Nov 11, 2009 · Explanation Everything in Python is an object, including lists. All objects have a header of some sort in the C implementation. Lists and other similar builtin objects with a …

  4. python - Best way to remove elements from a list - Stack Overflow

    Feb 2, 2014 · Python’s lists are variable-length arrays, not Lisp-style linked lists. The implementation uses a contiguous array of references to other objects, and keeps a pointer to …

  5. Checking if type == list in python - Stack Overflow

    Checking if type == list in python [duplicate] Asked 11 years, 1 month ago Modified 3 years, 3 months ago Viewed 644k times

  6. python - How do I clone a list so that it doesn't change …

    4147 new_list = my_list doesn't actually create a second list. The assignment just copies the reference to the list, not the actual list, so both new_list and my_list refer to the same list after …

  7. python - How to remove all duplicate items from a list - Stack …

    How would I use python to check a list and delete all duplicates? I don't want to have to specify what the duplicate item is - I want the code to figure out if there are any and remove them if so, …

  8. python - How to convert string representation of list to a list

    275 The json module is a better solution whenever there is a stringified list of dictionaries. The json.loads(your_data) function can be used to convert it to a list.

  9. Sum a list of numbers in Python - Stack Overflow

    By default, Python does integer division: it discards the remainder. To divide things through all the way, we need to use floating-point numbers. Fortunately, dividing an int by a float will produce …

  10. Identify duplicate values in a list in Python - Stack Overflow

    Is it possible to get which values are duplicates in a list using python? I have a list of items: