To address the two examples you brought up:

import itertools


data1 = range(10)

# This creates a NEW list
data1[2:5]

# This creates an iterator that iterates over the EXISTING list
itertools.islice(data1, 2, 5)


data2 = [1, 2, 3]
data3 = [4, 5, 6]

# This creates a NEW list
data2 + data3

# This creates an iterator that iterates over the EXISTING lists
itertools.chain(data2, data3)

There are many reasons why you'd want to use iterators instead of the other methods. If the lists are very large, it could be a problem to create a new list containing a large sub-list, or especially create a list that has a copy of two other lists. Using islice() or chain() allows you to iterate over the list(s) in the way you want, without having to use more memory or computation to create the new lists. Also, as unutbu mentioned, you can't use bracket slicing or addition with iterators.

I hope that's enough of an answer; there are plenty of other answers and other resources explaining why iterators are awesome, so I don't want to repeat all of that information here.

Answer from Cyphase on Stack Overflow
🌐
Python Module of the Week
pymotw.com › 2 › itertools
itertools – Iterator functions for efficient looping - Python Module of the Week
from itertools import * r = islice(count(), 5) i1, i2 = tee(r) for i in i1: print 'i1:', i for i in i2: print 'i2:', i
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-itertools-islice
Python - Itertools.islice() - GeeksforGeeks
March 20, 2026 - islice() is a function from Python’s built-in itertools module. It is used to slice an iterator without converting it into a list. Unlike normal slicing ([:]), it works directly on iterators like range(), generators or file objects.
🌐
Beautiful Soup
tedboy.github.io › python_stdlib › generated › generated › itertools.islice.html
itertools.islice — Python Standard Library
itertools.islice · View page source · class itertools.islice¶ · islice(iterable, [start,] stop [, step]) –> islice object · Return an iterator whose next() method returns selected values from an iterable. If start is specified, will skip all preceding elements; otherwise, start defaults ...
🌐
docs.python.org
docs.python.org › 3 › library › itertools.html
itertools — Functions creating iterators for efficient looping
If the input is an iterator, then fully consuming the islice advances the input iterator by max(start, stop) steps regardless of the step value.
🌐
Python Pool
pythonpool.com › home › blog › python’s itertools.islice() | slicing for iterators?
Python's itertools.islice() | Slicing for Iterators? - Python Pool
January 1, 2024 - # can be used as itertools.islice() import itertools # or you can use it as .islice() from itertools import islice ... Iterable – iterable are objects which generate an iterator. For instance, common python iterable are list, tuple, string, dictionaries
🌐
Tutorialspoint
tutorialspoint.com › python › python_itertools_islice_function.htm
Python itertools.islice() Function
The Python itertools.islice() function is used to return selected elements from an iterable. Unlike regular slicing, it works with iterators and does not require materializing the entire sequence in memory.
🌐
EyeHunts
tutorial.eyehunts.com › home › slicing dictionary python | example code
Slicing Dictionary Python | Example code
March 8, 2023 - Simple example code. You have to import the itertools module to use the islice method in this program. import itertools d = {1: "A", 2: "B", 3: "C"} res = dict(itertools.islice(d.items(), 2)) print(res)
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › iterator-functions-python-set-2islice-starmap-tee
Iterator Functions in Python | Set 2 (islice(), starmap(), tee()..) | GeeksforGeeks
February 4, 2020 - # Python code to demonstrate the working of # islice() and starmap() # importing "itertools" for iterator operations import itertools # initializing list li = [2, 4, 5, 7, 8, 10, 20] # initializing tuple list li1 = [ (1, 10, 5), (8, 4, 1), (5, 4, 9), (11, 10 , 1) ] # using islice() to slice the list acc.
🌐
Educative
educative.io › answers › what-is-itertoolsislice-method-in-python
What is itertools.islice() method in Python?
The islice() method in the itertools module in Python gets selected elements from iterators based on the index of the elements.
🌐
Stack Abuse
stackabuse.com › pythons-iteration-tools-filter-islice-map-and-zip
Python's Iteration Tools: filter(), islice(), map() and zip()
October 10, 2023 - Let's islice() a string. Since this returns a generator, we'll wrap it in a list to contain the result as well. If you omit the start argument - the function will slice until the mandatory provided end argument. If both are provided, it'll slice between them and return that segment: from itertools import islice old_string = "I need this, but not this" print(list(islice(old_string, 11)))
🌐
Pynerds
pynerds.com › python-itertools-islice
Python itertools islice()
September 8, 2023 - The function is also more flexible as it can as well be used with non-sequence iterables such as sets and dictionaries. Its syntax is similar to that of the builtin slice() function. ... The function returns an iterator that yields elements from the iterables whose indices from the start to stop(exclusive) with the step parameter as the 'jump' value. As in above case, when only a single integer argument is given to the islice() function alongside the iterable, the integer is used as the stop value, the slicing begins from the first element(index 0) up to the stop vlaue.
🌐
LabEx
labex.io › home › modules › itertools module
Python Itertools Module - Python Cheat Sheet
The itertools module is a collection of tools intended to be fast and use memory efficiently when handling iterators (like lists or dictionaries).
🌐
Linux Hint
linuxhint.com › python-itertools-islice-function
Linux Hint – Linux Hint
May 18, 2023 - Linux Hint LLC, [email protected] 1210 Kelly Park Circle, Morgan Hill, CA 95037 Privacy Policy and Terms of Use
🌐
Real Python
realpython.com › python-itertools
Python itertools By Example – Real Python
December 19, 2023 - You pass it an iterable, a starting, and stopping point, and, just like slicing a list, the slice returned stops at the index just before the stopping point. You can optionally include a step value, as well. The biggest difference here is, of course, that islice() returns an iterator.
🌐
Medium
medium.com › @jasonrigden › a-guide-to-python-itertools-82e5a306cdf8
A Guide to Python Itertools. Those iterables are more powerful than… | by Jason Rigden | Medium
August 1, 2018 - This function allows you to cut out a piece of an iterable. Code · colors = ['red', 'orange', 'yellow', 'green', 'blue',] few_colors = itertools.islice(colors, 2) for each in few_colors: print(each) Output ·
🌐
Dkharazi
dkharazi.github.io › notes › py › iterators › islice
itertools.islice
>>> from itertools import islice >>> letters = 'abcde' >>> slice = islice(letters, 2) >>> for i in slice: print(i) 'a' 'b' >>> slice = islice(letters, 2, 4) >>> for i in slice: print(i) 'c' 'd' >>> slice = islice(letters, 2, None) >>> for i in slice: print(i) 'c' 'd' 'e' >>> slice = islice(letters, 0, None, 2) >>> for i in slice: print(i) 'a' 'c' 'e'