Hi,
I recently came across this function but can't make sense of the arguments.
The documentation gives the declaration as below and examples.
https://docs.python.org/2/library/iterto...ols.islice
Example 1 shows that A B are printed but but the argument '2' is the starting index
so shouldn't the output be CDEFG?
Thanks in advance for any help.
I recently came across this function but can't make sense of the arguments.
The documentation gives the declaration as below and examples.
https://docs.python.org/2/library/iterto...ols.islice
1 2 3 |
itertools.islice(iterable, start, stop[, step]) # islice('ABCDEFG', 2) --> A B # islice('ABCDEFG', 2, 4) --> C D |
so shouldn't the output be CDEFG?
Thanks in advance for any help.