Python> What is an extended slice?

In comments How to write in PEP8 that you taught me.

For extended slices, you must have the same number of spaces on both sides.

I didn't know it was an extended slice.

However, Python's built-in list, tuple, and string sequence types have never supported this feature, raising a TypeError if you tried it.

Is the "extension" of the expansion slice an "extension" in the sense of "corresponding to list, tuple, string sequence"?

There are some examples of how to use it on the above page.

>>> L = range(10)
>>> L[::2]
[0, 2, 4, 6, 8]
>>> L[::-1]
[9, 8, 7, 6, 5, 4, 3, 2, 1, 0] I understand (I think) about the following described in.

For extended slices, you must have the same number of spaces on both sides.

Recommended Posts

Python> What is an extended slice?
What is Python
[Python] What is Pipeline ...
What is an iterator?
[Python] What is virtualenv
[What is an algorithm? Introduction to Search Algorithm] ~ Python ~
Python is an adult language
What is an instance variable?
[Python] Python and security-① What is Python?
[Python] * args ** What is kwrgs?
What is a python map?
Python Basic Course (1 What is Python)
[Ruby / Python / Java / Swift / JS] What is an algorithm?
What is Python? What is it used for?
[Python] What is a zip function?
[Python] What is a with statement?
[python] What is the sorted key?
Python for statement ~ What is iterable ~
What is the python underscore (_) for?
Python in is also an operator
Python slice
[Python] What is pandas Series and DataFrame?
What is NaN? NaN Zoya (Python) (394 days late)
What kind of programming language is Python?
Python learning basics ~ What is type conversion? ~
What is "mahjong" in the Python library? ??
[Statistics for programmers] What is an event?
What is a dog? Python installation volume
[Python] What is a slice? An easy-to-understand explanation of how to use it with a concrete example.
What is namespace
What is copy.copy ()
python string slice
What is dotenv?
What is Linux
What is klass?
What is SALOME?
What is Linux?
[Python] What to do when an error related to SSL authentication is returned
Python is instance
What is Linux
What is pyvenv
What is __call__
What is Linux
What is "functional programming" and "object-oriented" in Python?
What is wheezy in the Docker Python image?
I tried Python! ] I graduated today from "What is Python! Python!"!
What are you comparing with Python is and ==?
[Introduction to Udemy Python 3 + Application] 54. What is Docstrings?
Tell me what a conformal map is, Python!
python int is infinite
[Python] Type Error:'WebElement' object is not iterable What to do when an error occurs
What is a distribution?
What is Piotroski's F-Score?
What is Raspberry Pi?
What is Calmar Ratio?
What is a terminal?
[Python] What is energy data? Calender Heatmap [Plotly] Memo
[PyTorch Tutorial ①] What is PyTorch?
[Statistics] Understand what an ROC curve is by animation.
What is a hacker?
What is JSON? .. [Note]