def listAppendExtend(l1,element):
	if type(element)==list:
		l1.extend(element)
	else:
		l1.append(element)
def main():
	l1=[1,2,3]
	print(l1)
	
	listAppendExtend(l1,5)
	print(l1)
	
	listAppendExtend(l1,[4,5,6])
	print(l1)
	print("Length of list l1 :{}".format(len(l1)))
	data=l1.pop(2)
	print("After pop(2) method,the list is")
	print(l1)
	
	data = l1.remove(5)
	print("After remove(5) method,the list is")
	print(l1)
	l2=[]
	l2=l1.reverse()
	print("After reverse :{}".format(l2))
	
if __name__=="__main__":
	main()
