BILINGUAL WORD CARD · RANK 19

slice

🍞 Slicing a section out of a loaf

Extracts a portion of a list or string.

中文对照 · Chinese

🍞 从长面包里切下中间几片

用 `a[1:4]` 快速取出列表或字符串中的一小段。

Code example

sub = text[0:4]
Explore 100 bilingual word cards →