List : List Extend : List PYTHON examples


PYTHON examples » List » List Extend »

 

List


List: The Difference Between Extend and Append

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

print len(li)                                            

print li[-1

li = ['a''b''c'
li.append(['d''e''f'])                        

print li 

print len(li)                                            

print li[-1
           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo List
» List Extend