how to combine two lists using Python

To combine two lists using Python you can use the following snippet.

Sample Python

create a new list

list = list_1 + list_2 #creates a new list

extend a list

list_1.extend(list_2) #extends list 1

Please Share us:
Please rate this snippet

6 thoughts on “how to combine two lists using Python

Leave a Reply