Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung
gf_informatik:python_extras [2024-01-16 10:21] hofgf_informatik:python_extras [2024-02-04 09:03] (aktuell) – [List Slicing] hof
Zeile 24: Zeile 24:
 <code python> <code python>
 a[start:stop]  # items start through stop-1 a[start:stop]  # items start through stop-1
-a[start:     # items start through the rest of the array+a[start:     # items start through the rest of the list
 a[:stop]       # items from the beginning through stop-1 a[:stop]       # items from the beginning through stop-1
-a[:]           # a copy of the whole array+a[:]           # a copy of the whole list
  
 a[start:stop:step] # start through not past stop, by step a[start:stop:step] # start through not past stop, by step
  • gf_informatik/python_extras.1705400477.txt.gz
  • Zuletzt geändert: 2024-01-16 10:21
  • von hof