The Difference Between Extend and Append : Extend « List « Python Tutorial





li = ['a', 'b', 'c'] 
li.extend(['d', 'e', 'f'])                
print li 
print len(li)                                        
print li[-1]










7.10.Extend
7.10.1.The extend method appends several values at once by supplying a sequence of the values
7.10.2.Extend with list
7.10.3.The Difference Between Extend and Append