# s = 'python'
# li = ['aaa', 'bbb', 'ccc']
# tu = (123, '222', '999')
# # 下标取值
# # 从前往后:从0开始
# print(s[1])
# print(li[1])
# print(tu[1])
# # 从后往前:从-1开始
# print(s[-1])
# print(li[-2])
# print(tu[-3])

# 切片取值：获取数据中的某一段数据
li = [11, 22, 33, 44, 55, 66, 77, 88]
print(li[0:4])  #左闭右开
print(li[2:5])
