Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

extend a list python

#adding two or more elements in a list
list1 = [1,2,3,4,5]
list1.extend([6,7,8])
print(list1)
#output = [1, 2, 3 ,4 ,5, 6, 7, 8]
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #extend #list #python
ADD COMMENT
Topic
Name
5+6 =