About 50 results
Open links in new tab
  1. What are iterator, iterable, and iteration? - Stack Overflow

    What are "iterable", "iterator", and "iteration" in Python? How are they defined? See also: How to build a basic iterator?

  2. Is it "iterate through" or "iterate over" something? [closed]

    To me, iterating something means repeating it; it does not sound right as a synonym for looping over it. On the other hand, iterate over or through are commonly used in this sense.

  3. python - How to build a basic iterator? - Stack Overflow

    If you want to be able to iterate ctr more than once, it needs to be a non-iterator iterable, where it returns a brand new iterator each time __iter__ is invoked. Trying to mix and match (an iterator that is …

  4. What is the difference between iteration and traversing?

    Dec 12, 2013 · I still do not understand the main difference between iterating through a link list and traversing through one. I know that traversing means to go through (visiting every element) the link …

  5. Distinction between iterator and enumerator - Stack Overflow

    Jul 23, 2016 · Make no mistake, I can find the meaning of the two terms but I get slightly different answers. What would be the best answer for an interview? IMO an iterator "iterates" over a …

  6. What is the easiest/best/most correct way to iterate through the ...

    Jan 6, 2017 · 497 Some ways to iterate through the characters of a string in Java are: Using StringTokenizer? Converting the String to a char[] and iterating over that. What is the …

  7. Loop (for each) over an array in JavaScript - Stack Overflow

    Feb 17, 2012 · We want to iterate over the array and create a new array: Array.prototype.map We want to iterate over the array and don't create a new array: Array.prototype.forEach for..of loop In …

  8. python - Is there a need for range (len (a))? - Stack Overflow

    As python for constructs are intended to iterate over iterables and not only ranges of integers, are there real-world use-cases where you need in range(len(a))?

  9. What does the "yield" keyword do in Python? - Stack Overflow

    Oct 24, 2008 · Iteration is a process implying iterables (implementing the __iter__() method) and iterators (implementing the __next__() method). Iterables are any objects you can get an iterator …

  10. How to iterate over a string in C? - Stack Overflow

    Most C strings are null-terminated, meaning that as soon as the character becomes a '\0' the loop should stop. The *++string is moving the pointer one byte, then dereferencing it, and the loop repeats.