#3.1
names = ['zhangyuanying','zhangyixiong','zhangziqi','harvey','andy']
for name in names:
print(name)
#3.4,3.6, 3.7
guests = ['harvey','john','bob']
for guest in guests:
print(guest + ",would you like to attend my party?")
print ("we have a bigger table for our party!\n")
guests.insert(0,'alice')
guests.insert(2,'frank')
guests.append('aimer')
for guest in guests:
print(guest + ",would you like to attend my party?")
print("I'm sorry,because of the lack of the table,I can only invite two guests")
_name = guests.pop()
print ("I'm sorry that we can't enjoy the dinner together")
_name = guests.pop()
print ("I'm sorry that we can't enjoy the dinner together")
_name = guests.pop()
print ("I'm sorry that we can't enjoy the dinner together")
_name = guests.pop()
print ("I'm sorry that we can't enjoy the dinner together")
for guest in guests:
print(guest + ",Let's enjoy a wonderful night !")
del guests[0]
del guests[0]
print (guests)
#3.8
destinations = ["paris","beijing","london","newYork","tokyo "]
print(destinations)
print (sorted(destinations))
print(destinations)
print(sorted(destinations,reverse = True))
print(destinations)
destinations.reverse()
print(destinations)
destinations.reverse()
print(destinations)
destinations.sort()
print(destinations)
destinations.sort(reverse = True)
print(destinations)