Qurak

Part

ใช้งานได้ แตกต่างจากเอกสารอ้างอิง .wl

Returns the nth element of a list.

Part extraction using `[[]]` notation The `[[n]]` notation is equivalent to `Part[..., n]`.
Part extraction from variables
Out of bounds error Attempting to access an index beyond the list length returns an error.
Part[{7, 6, 4}, 2] → 6{1, 2, 3}[[2]] → 2{a, b, c, d}[[3]] → cx = {10, 20, 30}; x[[2]] → 20list = {a, b, c}; list[[1]] → a{1, 2, 3}[[5]] → Part::partw: Part 5 of {1, 2, 3} does not exist. {1, 2, 3}[[5]]x = {1, 2}; x[[10]] → Part::partw: Part 10 of {1, 2} does not exist. {1, 2}[[10]]

ใช้ใน

หัวข้อ

ที่เกี่ยวข้อง

ฟังก์ชันทั้งหมด 6300 รายการ · ใช้สิ่งนี้จากไคลเอนต์ MCP