From d731e97104469b6935b4fb59575ed0f9ae9077a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=B6=E4=BC=9F=20=E5=88=98?= Date: Tue, 16 Oct 2018 10:00:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E7=89=87=E7=9A=84=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E9=83=A8=E5=88=86=E7=9A=84=E4=BF=AE=E6=AD=A3=20(#545)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update 07.4.md * Update 07.2.md 修改切片的描述。 --- eBook/07.4.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eBook/07.4.md b/eBook/07.4.md index 28d5898..2f30ac8 100644 --- a/eBook/07.4.md +++ b/eBook/07.4.md @@ -78,9 +78,9 @@ a = a[0:4] // ref of subarray {5,6,7,8} - len(a) is now 4 but cap(a) is still 5 **问题 7.7** -1) 如果 a 是一个切片,那么 `s[n:n]` 的长度是多少? +1) 如果 a 是一个切片,那么 `a[n:n]` 的长度是多少? -2) `s[n:n+1]` 的长度又是多少? +2) `a[n:n+1]` 的长度又是多少? ## 链接