# -*- coding: utf-8 -*-l = list('python')
print(l)
l[2:] = 'zza'
print(l)numbers = [1, 5]
print(numbers)numbers[1:1] = [2, 3, 4]
print(numbers)numbers[1:4] = []
print(numbers)d = {'lilei': 98, 'hanmeimei': 99} # 写字典的方法
print(d)message = [('lilei', 98), ('hanmeimei', 99)] # 写字典的方法
e = dict(message)
print(e)f = dict(lilei=98, hanmeimei=99) # 写字典的方法
print(f)age = e['lilei'], d['lilei'], f['lilei']
print(age)favorite_class = {'lilei': ['math', 'english'],'hanmeimei': ['chinese'],'madongmei': ['competer', 'python', 'math']
}
print(favorite_class)
print(favorite_class['madongmei'][1])student1 = {'name': '李雷', '成绩': '98', '实验班': 'True'} # 用一个字典表示一个学生的信息
class1 = {'李雷': {'成绩': '98', '实验班': True},'韩梅梅': {'成绩': '95', '实验班': False}
} # 用一个字典表示全班学生的信息
print(class1)
print(class1['李雷']['成绩'])l1 = [1, 2, 3, 4]
l2 = l1.copy() # 列表复制,一组列表复制成为两组列表
print(id(l1))
print(id(l2))
l2[0] = 5
print(l2)
print(l1)l3 = [1,2,3,4]
l4 = l3 # 一组列表两个名字l3 ,l4
l4[2] = 6
print(l3)
print(l4)
print(id(l3))
print(id(l4))