Answers:
-1Python中的,尽管它经常会导致难以调试的错误。
panic: runtime error: index out of range了profiles[len(profiles)-1].UserId,我猜片的长度为0,因此恐慌?
不太优雅,但也可以做到:
sl[len(sl)-1: len(sl)]
sl[len(sl)-1:],但返回的切片包含最后一个元素,而不仅仅是最后一个元素。play.golang.org/p/kcThrqa-64c
-1Python拥有的索引...