You can use the plus operator (‘+’) in order to concatenate lists in Python:
concatenated_list = list_1 + list_2
For example, let’s say that you want to concatenate the following two lists:
products_1 = ['computer', 'tablet', 'printer', 'monitor'] products_2 = ['keyboard', 'mouse', 'laptop', 'scanner']
You can then use the + operator to concatenate the two lists together:
products_1 = ['computer', 'tablet', 'printer', 'monitor'] products_2 = ['keyboard', 'mouse', 'laptop', 'scanner'] concatenated_list = products_1 + products_2 print(concatenated_list)
Once you run the in Python, you’ll get the concatenated list:
['computer', 'tablet', 'printer', 'monitor', 'keyboard', 'mouse', 'laptop', 'scanner']