About 73 results
Open links in new tab
  1. Python: list of lists - Stack Overflow

    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. The second, list(), is using the actual …

  2. What is the difference between list and list [:] in python?

    Nov 2, 2010 · When reading, list is a reference to the original list, and list[:] shallow-copies the list. When assigning, list (re)binds the name and list[:] slice-assigns, replacing what was previously in the list. …

  3. Meaning of list[-1] in Python - Stack Overflow

    I have a piece of code here that is supposed to return the least common element in a list of elements, ordered by commonality: def getSingle(arr): from collections import Counter c = Counte...

  4. python - Removing duplicates in lists - Stack Overflow

    Nov 1, 2011 · You cannot put lists in sets since lists are mutable and could change (which could affect whether they are duplicate to another list in the set). I would suggest a different approach for a list of …

  5. Power Automate – Some SharePoint List Columns Not Appearing in …

    Jun 14, 2025 · I'm working on a Power Automate flow that updates items in a SharePoint Online list. However, I'm facing an issue where certain columns (including Person/Group fields) are not …

  6. python - if else in a list comprehension - Stack Overflow

    Feb 2, 2013 · can we have list comprehension without a for loop and just if/else to put a single default value inside the list and later extend it if required? i.e. result = [ 'hello' if x == 1 ].

  7. loops - Ways to iterate over a list in Java - Stack Overflow

    Being somewhat new to the Java language I'm trying to familiarize myself with all the ways (or at least the non-pathological ones) that one might iterate through a list (or perhaps other collection...

  8. Quick way to create a list of values in C#? - Stack Overflow

    I'm looking for a quick way to create a list of values in C#. In Java I frequently use the snippet below:

  9. Difference between List, List<?>, List<T>, List<E>, and List<Object>

    The notation List<?> means "a list of something (but I'm not saying what)". Since the code in test works for any kind of object in the list, this works as a formal method parameter. Using a type parameter …

  10. 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.