offer_list = ['Allen','Tom'] # 生成列表 for i in offer_list: # for循环遍历取值,依次输出 print(f"{i}, you have passed our interview and will soon become a member of our company.") offer_list[1] = 'Andy' # 利用下标修改列表值 for i in offer_list: # for循环遍历取值,依次输出 print(f"{i}, welcome to join us!")