NP16. 发送offer
描述
输入描述
无输出描述
Python 解法, 执行用时: 10ms, 内存消耗: 2824KB, 提交时间: 2022-08-05
offer_list = ['Allen','Tom'] # out for i in range(len(offer_list)): print('{}, you have passed our interview and will soon become a member of our company.'.format(offer_list[i])) for str_i in offer_list: if str_i == 'Tom': print('Andy, welcome to join us!' ) else: print('{}, welcome to join us!'.format(str_i) )
Python 解法, 执行用时: 10ms, 内存消耗: 2828KB, 提交时间: 2022-07-09
offer_list = ['Allen','Tom'] for i in offer_list: print(i + ', you have passed our interview and will soon become a member of our company.') offer_list.remove('Tom') offer_list.append('Andy') for j in offer_list: print(j + ', welcome to join us!')
Python 解法, 执行用时: 10ms, 内存消耗: 2832KB, 提交时间: 2022-07-03
offer_list = ['Allen','Tom'] for i in offer_list: print(i + ", you have passed our interview and will soon become a member of our company.") offer_list.remove('Tom') offer_list.append('Andy') for j in offer_list: print(j + ", welcome to join us!")
Python 解法, 执行用时: 10ms, 内存消耗: 2836KB, 提交时间: 2022-07-29
offer_list = ['Allen','Tom'] for i in offer_list: print('%s, you have passed our interview and will soon become a member of our company.' %i) offer_list[1] = 'Andy' for n in offer_list: print('%s, welcome to join us!' %n)
Python 解法, 执行用时: 10ms, 内存消耗: 2836KB, 提交时间: 2022-06-29
list=['Allen','Tom'] for str in list: print("{}, you have passed our interview and will soon become a member of our company.".format(str)) list.remove("Tom") list.append("Andy") for str in list: print("{}, welcome to join us!".format(str))