# # 查找列表中的元素并替换
# # 方法一
# lst = [1, 5, 3, 20, 6, 2, 7]
# for i in lst:
# if i % 2 == 0:
# lst[lst.index(i)] = 'even'
# print(lst)
# # 方法二
# lst = [1, 5, 3, 20, 6, 2, 7]
# for i in range(len(lst)):
# if lst[i] % 2 == 0:
# lst[i] = 'even'
# print(lst)
# # 方法三
# lst = [1, 5, 3, 20, 6, 2, 7]
# for i, ele in enumerate(lst):
# if ele % 2 == 0:
# lst[i] = 'even'
# print(lst)