my_frind = ['曹大鹏','王姐','李妍']
message = "hi,"+ my_frind[0] + "周末一起来吃晚饭啊"
print("hi,"+ my_frind[0]+"周末一起吃饭啊")
#print(message)
print("王姐","没时间不能来了")
del my_frind['王姐']
my_frind.insert(1,"君君")
print(my_frind)
TypeError: list indices must be integers or slices, not str
意思是列表智能是整数,不能是字符,将del my_frind['王姐'] 改为del my_frind[1]