Mega Code Archive

 
Categories / Python / List
 

Append multiple items to a list

L = [1, 2] L.extend([3,4,5])      # append multiple items print L