Skip to content
Advertisement

How do I concatenate two lists in Python?

How do I concatenate two lists in Python?

Example:

JavaScript

Expected outcome:

JavaScript

Advertisement

Answer

Use the + operator to combine the lists:

JavaScript

Output:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement