extension to list extend

James Stroud jstroud at mbi.ucla.edu
Tue Oct 16 05:37:33 EDT 2007


Found that this would be handy today:

   alist = [1, 2, 3]
   alist.extend(['a', 'b', 'c'], 1)
   alist == [1, 'a', 'b', 'c', 2, 3]  # True

James

-- 
James Stroud
UCLA-DOE Institute of Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com



More information about the Python-list mailing list