#!/usr/bin/env python # -*- coding:utf-8 -*- a = [1, 2, 3, 4, 5] # 索引 print(a[0], a[1], a[2], a[3], a[4]) print('-'*20) # 切片 print(a[:]) print(a[:3]) print(a[0], a[1], a[2], a[3], a[4]) print(a[-1], a[-2], a[-3], a[-4], a[-5]) print('-'*20) # append…