#作业1:
# dic = {
#     "k1" : [],
#     "k2" : []
# }
# li = [11, 22, 33, 44, 55, 66, 77, 88, 99]
# for i in li:
#     if i <= 66:
#         dic['k1'].append(i)
#     else:
#         dic['k2'].append(i)
# print(dic)

#作业2：
#strip 和 trim 区别
#str.startswith()
#str.endswith()

#输出以f开头，g结尾的元素
li = ['fang', ' gong', 'hhhhhh']

#作业3：
#商品 li = ["手机", "电脑", "鼠标垫", "游艇"]
# li = ["手机", "电脑", "鼠标垫", "游艇"]
#
# for i, j in enumerate(li):
#     print(i + 1, j)
#
# num = int(input('num:'))
# len_li = len(li)
#
# if num > 0 and num <= len_li:
#     # 索引
#     goods = li[num - 1]
#     print(goods)
# else:
#     print('商品不存在')
