# 要求使用index  返回第二个1的索引位置
# li = [0, 2, 1, 4, 5, 1, 6, 7]

# print(li.index(1, li.index(1)+1))


# names = ['teacher1', 'teacher2', 'liuser', 'rain', 'olddriver', '玉田', '王长贵', '小萌']

# names111 = names[-4:-1]

# print(names[::-1])
#
# names.reverse()
# print(names)

# li = [1, 544, 465, 654, 4, 9, 4, 541, 674, 68, 416, 54, 6874, 6, 54, 34, 456, 413, 513]
#
# li.sort(reverse=True)
# print(li)
# li1 = ["a", "b", "ds", "aa", "v", "c", "A"]

# li1.sort()

# print(li1)


# names = ['miller', '王长贵', '@', '1', '4', '#', '黑姑娘']
#
# names.sort()
# print(names)


# names = ["miller" ,"eva", "黑姑娘", "rain", "狗蛋", "银角大王", "eva", "鸡头", "liuser"]
# 通过names.index()的方法返回第2个eva的索引值

# res = names.index("eva", names.index("eva")+1)
# print(res)


# 把以上的列表通过切片的形式实现反转
# print(names[::-1])


# 打印列表中所有下标为奇数的值

# for i in range(0, len(names)):
#     if i % 2 != 0:
#         print(names[i])

# 通过names.index()方法找到第2个eva值 ，并将其改成EVA
# names[names.index("eva", names.index("eva")+1)] = "EVA"
# print(names)







