#! /usr/bin/python
# _* _coding:UTF-8 _*_
list=["apple","banana","grape","orange"]
print list
print list[2]
list.append("sdf")
list.insert(1,"grapefruit")
print list
list.remove("grape")
print list
print"##################################################"
print list.pop()
print list
print"##################################################"
#use connecting
list1=["a","b"]
list2=["c","d"]
list1.extend(list2)
print list1
list3=["e"]
list1=list1+list3
print list1
print list1.index("b")
print "f" in list1
print"##################################################"
list1.sort()
print list1
list1.sort(None,None,True)
print list1
list1.reverse()
print list1
print"##################################################"
#use stack
list4=["a","b"]
list4.append("c")
print list4
print list4.pop()
print list4
print"##################################################"
#use queue
list4=["a","b"]
list4.append("c")
print list4
print list4.pop(0)
print list4