⊗pyPmSlInr 76 of 208 menu

Slices in Python

Slices are a selection of elements retrieved by their index, for example from a string or a list. You've seen elements retrieved by index before. Slices work similarly, but they also allow you to select elements in a range by specifying a start and end position. They can also be used to specify a selection step. The syntax for slices is:

string[begin:end:step]

The following lessons will cover in detail the basic techniques for working with sections.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline