题解 | #发送offer#

发送offer

https://www.nowcoder.com/practice/66969869634b4142ac371684fcf89764

namelist = ['Allen', 'Tom']
for names in namelist:
    print("{}, you have passed our interview and will soon become a member of our company.".format(names))
namelist.remove('Tom')
namelist.append('Andy')
for names in namelist:
    print("{}, welcome to join us!".format(names))
全部评论
1. 知道元素的下标的话,可以通过下标重新赋值:namelist[1] = 'Andy' 2. 不知道元素下标,只知道元素名字,先remove,在append
点赞 回复 分享
发布于 2023-01-24 15:15 上海

相关推荐

我面试,她问我有女朋友没
不太迷人的反派_:不过对象,还会结合你老家,意向城市等等,看你是否稳定。哥们,别多想
点赞 评论 收藏
分享
06-04 09:27
门头沟学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务