2017.5.3 practice

name_list = ['a','b','c']

print(name_list)

print(name_list[1] + ' cannot attend this meeting.')

name_list[1] = 'd'

print(name_list)

print("Another bigger table has been found, 6 people can be invited.")

name_list.insert(0, 'e')

print(name_list)

name_list.insert(2, 'f')

name_list.append('g')

print(name_list)

print("Only two guests can be invited...")

delete_1 = name_list.pop()

print(delete_1)

print("I am sorry "+ delete_1+ " cannot attend this meeting")

print(name_list)

delete_2 = name_list.pop()

print(delete_2)

print("I am sorry "+ delete_2+ " cannot attend this meeting")

print(name_list)

delete_3 = name_list.pop()

print(delete_3)

print("I am sorry "+ delete_3+ " cannot attend this meeting")

print(name_list)

delete_4 = name_list.pop()

print(delete_4)

print("I am sorry "+ delete_4+ " cannot attend this meeting")

print(name_list)

del name_list[0]

print(name_list)

del name_list[0]

print(name_list)

你可能感兴趣的:(2017.5.3 practice)