Top "Iterable" questions

An iterable is an object, such as a string or collection, that can be iterated over, yielding up its members one at a time.

Understanding slice notation

I need a good explanation (references are a plus) on Python's slice notation. To me, this notation needs a bit …

python list slice iterable
Python - TypeError: 'int' object is not iterable

Here's my code: import math print "Hey, lets solve Task 4 :)" number1 = input ("How many digits do you want to look …

python list loops iterable
In Python, how do I determine if an object is iterable?

Is there a method like isiterable? The only solution I have found so far is to call hasattr(myObj, '__…

python iterable
Java: Get first item from a collection

If I have a collection, such as Collection<String> strs, how can I get the first item out? …

java collections iterable
What exactly are iterator, iterable, and iteration?

What is the most basic definition of "iterable", "iterator" and "iteration" in Python? I have read multiple definitions but I …

python iterator iteration terminology iterable
Convert Java Array to Iterable

I have an Array of primitives, for example for int, int[] foo. It might be a small sized one, or …

java arrays iterable
What is the difference between iterator and iterable and how to use them?

I am new in Java and I'm really confused with iterator and iterable. Can anyone explain to me and give …

java iterator iterable
Convert Iterable to Stream using Java 8 JDK

I have an interface which returns java.lang.Iterable<T>. I would like to manipulate that result using …

java java-8 java-stream iterable
Get size of an Iterable in Java

I need to figure out the number of elements in an Iterable in Java. I know I can do this: …

java iterable
Collection to Iterable

How can I get a java.lang.Iterable from a collection like a Set or a List? Thanks!

java collections iterable