Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

This is a Slice.

[start:end:step]

Leaving any blank puts them at a default value, in your case it is taking every y elements starting at x and going until the end of the list.

See: What is :: (double colon) in Python when subscripting sequences?What is :: (double colon) in Python when subscripting sequences?

This is a Slice.

[start:end:step]

Leaving any blank puts them at a default value, in your case it is taking every y elements starting at x and going until the end of the list.

See: What is :: (double colon) in Python when subscripting sequences?

This is a Slice.

[start:end:step]

Leaving any blank puts them at a default value, in your case it is taking every y elements starting at x and going until the end of the list.

See: What is :: (double colon) in Python when subscripting sequences?

Source Link
Jeff B

This is a Slice.

[start:end:step]

Leaving any blank puts them at a default value, in your case it is taking every y elements starting at x and going until the end of the list.

See: What is :: (double colon) in Python when subscripting sequences?

lang-py