0

Solved Ai generated practice the last question

Slice notation for watermelon [“water, bread, sugar, melon”] [0+3]

25th Feb 2025, 1:03 PM
Christian Francis
Christian Francis - avatar
2 odpowiedzi
+ 4
the syntax for slicing is [start: stop: step] when only 2 values are given, it's [start:stop] you copied the code inaccurately. Strings go between " ".
25th Feb 2025, 1:20 PM
Lisa
Lisa - avatar
+ 1
[start : end : step] # or [start : stop : step] the end or stop is excluded
25th Feb 2025, 2:24 PM
Mihaly Nyilas
Mihaly Nyilas - avatar