Mega Code Archive

 
Categories / Python Tutorial / List
 

The Difference Between Extend and Append

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